ECRegistrationHandler implements FormSubmissionHandler { @Override public void handle(FormSubmission submission) { ecService.register(submission); } ECRegistrationHandler(EligibleCoupleService ecService); @Override void handle(FormSubmission submission);  }
@Test public void shouldDelegateFormSubmissionHandlingToECService() throws Exception { FormSubmission submission = create().withFormName("ec_registration").withInstanceId("instance id 1").withVersion("122").build(); handler.handle(submission); verify(ecService).register(submission); }