DeliveryOutcomeHandler implements FormSubmissionHandler { @Override public void handle(FormSubmission submission) { ancService.deliveryOutcome(submission); pncService.deliveryOutcome(submission); childService.registerChildren(submission); } @Autowired  DeliveryOutcomeHandler(ANCService ancService, PNCService pncService, ChildService childService); @Override void handle(FormSubmission submission);  }
@Test public void shouldDelegateFormSubmissionHandlingToBothANCAndPNCService() throws Exception { FormSubmission submission = new FormSubmission("anm id 1", "instance id 1", "delivery_outcome", "entity id 1", 0L, "1", null, 0L); handler.handle(submission); verify(ancService).deliveryOutcome(submission); verify(pncService).deliveryOutcome(submission); verify(childService).registerChildren(submission); }