ReportingService { public void deleteReportData(ReportDataDeleteRequest deleteRequest) { gateway.sendEventMessage(new ReportDeleteEvent(deleteRequest).toEvent()); } @Autowired  ReportingService(OutboundEventGateway gateway); void sendReportData(ReportingData data); void updateReportData(ReportDataUpdateRequest dataRequest); void deleteReportData(ReportDataDeleteRequest deleteRequest);  }
@Test public void shouldPutReportingDataDeleteRequestIntoQueue() throws Exception { ReportingService service = new ReportingService(gateway); ReportDataDeleteRequest request = ReportDataDeleteRequest.serviceProvidedDataDeleteRequest("entity id 1"); service.deleteReportData(request); verify(gateway).sendEventMessage(new ReportDeleteEvent(request).toEvent()); }