ReportingService { public void sendReportData(ReportingData data) { gateway.sendEventMessage(new ReportEvent(data).toEvent()); } @Autowired  ReportingService(OutboundEventGateway gateway); void sendReportData(ReportingData data); void updateReportData(ReportDataUpdateRequest dataRequest); void deleteReportData(ReportDataDeleteRequest deleteRequest);  }
@Test public void shouldPutReportingDataIntoQueue() throws Exception { ReportingService service = new ReportingService(gateway); ReportingData data = new ReportingData("Registration").with("mom", "Theresa"); service.sendReportData(data); verify(gateway).sendEventMessage(new ReportEvent(data).toEvent()); }