Subscriber { public boolean isSync() { return sync; } protected  Subscriber(); protected  Subscriber(boolean sync); boolean isSync(); abstract void onEvent(Event event);  }
@Test public void isSync() throws Exception { Subscriber subscriber = new TestSubscriber(); Assert.assertTrue(subscriber.isSync()); subscriber = new TestAsyncSubscriber(); Assert.assertFalse(subscriber.isSync()); }