@Test public void shouldTriggerNotifyOnEventService() throws Exception { Rnr requisition = make(a(defaultRequisition)); RequisitionStatusChangeEvent event = mock(RequisitionStatusChangeEvent.class); whenNew(RequisitionStatusChangeEvent.class).withArguments(requisition, notificationServices).thenReturn(event); service.notifyForStatusChange(requisition); verify(eventService).notify(event); }
public void notifyForStatusChange(Rnr requisition) { try { eventService.notify(new RequisitionStatusChangeEvent(requisition, notificationServices)); } catch (URISyntaxException e) { throw new DataException("error.malformed.uri"); } }
RequisitionEventService { public void notifyForStatusChange(Rnr requisition) { try { eventService.notify(new RequisitionStatusChangeEvent(requisition, notificationServices)); } catch (URISyntaxException e) { throw new DataException("error.malformed.uri"); } } }
RequisitionEventService { public void notifyForStatusChange(Rnr requisition) { try { eventService.notify(new RequisitionStatusChangeEvent(requisition, notificationServices)); } catch (URISyntaxException e) { throw new DataException("error.malformed.uri"); } }  }
RequisitionEventService { public void notifyForStatusChange(Rnr requisition) { try { eventService.notify(new RequisitionStatusChangeEvent(requisition, notificationServices)); } catch (URISyntaxException e) { throw new DataException("error.malformed.uri"); } }  void notifyForStatusChange(Rnr requisition); }
RequisitionEventService { public void notifyForStatusChange(Rnr requisition) { try { eventService.notify(new RequisitionStatusChangeEvent(requisition, notificationServices)); } catch (URISyntaxException e) { throw new DataException("error.malformed.uri"); } }  void notifyForStatusChange(Rnr requisition);  }