@Test
public void post() throws Exception {

    TestSubscriber subscriber = new TestSubscriber();
    try {
        Assert.assertEquals(EventBus.isEnable(TestEvent.class), false);
        EventBus.register(TestEvent.class, subscriber);
        Assert.assertEquals(EventBus.isEnable(TestEvent.class), true);
        EventBus.post(new NullTestEvent());
        EventBus.post(new TestEvent("xxx"));
        Assert.assertEquals(subscriber.getCache(), "xxx");
    } finally {
        EventBus.unRegister(TestEvent.class, subscriber);
    }
    Assert.assertEquals(EventBus.isEnable(TestEvent.class), false);
}