@Test public void listensForDocumentUpdatingEvents() throws ComponentLookupException { List<Event> events = this.mocker.getComponentUnderTest().getEvents(); Assert.assertFalse(events.isEmpty()); Assert.assertEquals(1, events.size()); Assert.assertTrue(events.iterator().next().matches(new DocumentUpdatingEvent())); Assert.assertFalse(events.iterator().next().matches(new DocumentUpdatedEvent())); Assert.assertFalse(events.iterator().next().matches(new DocumentCreatingEvent())); Assert.assertFalse(events.iterator().next().matches(new DocumentDeletingEvent())); }
@Override public List<Event> getEvents() { return Collections.<Event>singletonList(new DocumentUpdatingEvent()); }
PatientChangingEventSource implements EventListener { @Override public List<Event> getEvents() { return Collections.<Event>singletonList(new DocumentUpdatingEvent()); } }
PatientChangingEventSource implements EventListener { @Override public List<Event> getEvents() { return Collections.<Event>singletonList(new DocumentUpdatingEvent()); }  }
PatientChangingEventSource implements EventListener { @Override public List<Event> getEvents() { return Collections.<Event>singletonList(new DocumentUpdatingEvent()); }  @Override String getName(); @Override List<Event> getEvents(); @Override void onEvent(Event event, Object source, Object data); }
PatientChangingEventSource implements EventListener { @Override public List<Event> getEvents() { return Collections.<Event>singletonList(new DocumentUpdatingEvent()); }  @Override String getName(); @Override List<Event> getEvents(); @Override void onEvent(Event event, Object source, Object data);  }