ReportingService { public void updateReportData(ReportDataUpdateRequest dataRequest) { gateway.sendEventMessage(new ReportUpdateEvent(dataRequest).toEvent()); } @Autowired  ReportingService(OutboundEventGateway gateway); void sendReportData(ReportingData data); void updateReportData(ReportDataUpdateRequest dataRequest); void deleteReportData(ReportDataDeleteRequest deleteRequest);  }
@Test public void shouldPutReportingDataUpdateRequestIntoQueue() throws Exception { ReportingService service = new ReportingService(gateway); ReportDataUpdateRequest request = ReportDataUpdateRequest.buildReportDataRequest("anmReport", Indicator.ANC, "2012-12-25", "2013-01-01", null); service.updateReportData(request); verify(gateway).sendEventMessage(new ReportUpdateEvent(request).toEvent()); }