EventSubscription { public void publish(final JVoiceXMLEvent event) { subscriber.onEvent(event); } EventSubscription(final String eventType,
            final EventSubscriber eventSubscriber); String getType(); boolean matches(final String eventType); EventSubscriber getSubscriber(); void publish(final JVoiceXMLEvent event); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void testPublish() { final String type = "test.dummy.event"; final MockEventSubscriber subscriber = new MockEventSubscriber(); final EventSubscription subscription = new EventSubscription(type, subscriber); final JVoiceXMLEvent event = new ConnectionDisconnectHangupEvent(); subscription.publish(event); Assert.assertEquals(event, subscriber.getEvent()); Assert.assertEquals(subscriber, subscription.getSubscriber()); }