ANCRegistrationHandler implements FormSubmissionHandler { @Override public void handle(FormSubmission submission) { motherService.registerANC(submission); } ANCRegistrationHandler(MotherService motherService); @Override void handle(FormSubmission submission);  }
@Test public void shouldDelegateFormSubmissionHandlingToMotherService() throws Exception { FormSubmission submission = create().withFormName("anc_registration").withInstanceId("instance id 1").withVersion("122").build(); handler.handle(submission); verify(motherService).registerANC(submission); }