EventBus { public void subscribe(final String type, final EventSubscriber subscriber) { final EventSubscription subscription = new EventSubscription(type, subscriber); synchronized (subscriptions) { subscriptions.add(subscription); } } EventBus(); void subscribe(final String type, final EventSubscriber subscriber); boolean unsubscribe(final String type,
            final EventSubscriber subscriber); void publish(final JVoiceXMLEvent event);  }
@Test public void testSubscribe() { final EventSubscriber subscriber = new MockEventSubscriber(); final EventBus bus = new EventBus(); final String type = "test.dummy.event"; bus.subscribe(type, subscriber); Assert.assertTrue(bus.unsubscribe(type, subscriber)); }