@@ -0,0 +1,1127 @@
+package com.shopwiki.roger.event;%0A%0Aimport java.io.IOException;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport com.shopwiki.roger.example.ExampleEventHandler;%0Aimport com.shopwiki.roger.example.ExampleEventSender;%0A%0Apublic class EventTest %7B%0A%0A    @Test%0A    public void test1() throws Exception %7B // add handler then start%0A        ExampleEventHandler.declareExchange();%0A        ExampleEventHandler.manager.add(ExampleEventHandler.handler, ExampleEventHandler.ROUTE);%0A        ExampleEventHandler.manager.start();%0A        assertEvent();%0A        ExampleEventHandler.manager.stop();%0A    %7D%0A%0A    @Test%0A    public void test2() throws Exception %7B // start then add handler%0A        ExampleEventHandler.declareExchange();%0A        ExampleEventHandler.manager.start();%0A        ExampleEventHandler.manager.add(ExampleEventHandler.handler, ExampleEventHandler.ROUTE);%0A        assertEvent();%0A        ExampleEventHandler.manager.stop();%0A    %7D%0A%0A    private static void assertEvent() throws IOException %7B%0A        ExampleEventSender.sendEvent();%0A        Assert.assertEquals(%22Hello Robert!%22, ExampleEventHandler.lastMessage);        %0A    %7D%0A%7D%0A

Add unit test for Events