@@ -0,0 +1,1109 @@
+package com.semation.jstatsd.server.messaging.disruptor;%0A%0Aimport com.lmax.disruptor.EventHandler;%0Aimport com.semation.jstatsd.StatsMessage;%0Aimport org.junit.Test;%0A%0Aimport static org.easymock.EasyMock.*;%0A%0A/**%0A * Created by IntelliJ IDEA.%0A * User: jabourbih%0A * Date: 09/04/2012%0A * Time: 15:37%0A */%0Apublic class DisruptorMessageEventHandlerTest %7B%0A    @Test%0A    public void testOnEvent() throws Exception %7B%0A        EventHandler%3CStatsMessage%3E handler = new DisruptorMessageEventHandler(5);%0A%0A        StatsMessage messageMock = createMock(StatsMessage.class);%0A        expect(messageMock.getOperation()).andReturn(StatsMessage.Operation.unknown);%0A%0A        replay(messageMock);%0A        handler.onEvent(messageMock, 0, true);%0A        verify(messageMock);%0A%0A        reset(messageMock);%0A%0A        replay(messageMock);%0A        handler.onEvent(messageMock, 1, true);%0A        verify(messageMock);%0A%0A        reset(messageMock);%0A        expect(messageMock.getOperation()).andReturn(StatsMessage.Operation.unknown);%0A        replay(messageMock);%0A%0A        handler.onEvent(messageMock, 5, true);%0A%0A        verify(messageMock);%0A    %7D%0A%7D%0A

Add unit test for event handler