AppRemotePresenter { public void saveIncidentForm(RecordForm recordForm) { Blob incidentFormBlob = new Blob(gson.toJson(recordForm).getBytes()); IncidentForm incidentForm = new IncidentForm(incidentFormBlob); incidentForm.setModuleId(MODULE_ID_GBV); incidentFormService.saveOrUpdate(incidentForm); } @Inject  AppRemotePresenter(Lazy<FormRemoteService> formRemoteService,
                              CaseFormService caseFormService,
                              TracingFormService tracingFormService,
                              IncidentFormService incidentFormService,
                              Lazy<SystemSettingsService> systemSettingsService);  AppRemotePresenter(FormRemoteService formRemoteService,
                              CaseFormService caseFormService,
                              TracingFormService tracingFormService,
                              IncidentFormService incidentFormService,
                              SystemSettingsService systemSettingsService); void loadCaseForm(String moduleId, AppRemoteService.LoadCallback callback); void saveCaseForm(RecordForm recordForm, String moduleId); void loadTracingForm(AppRemoteService.LoadCallback callback); void saveTracingForm(RecordForm recordForm); void loadIncidentForm(AppRemoteService.LoadCallback callback); void saveIncidentForm(RecordForm recordForm); void loadSystemSettings();  }
@Test public void should_save_form_when_give_incident_form() throws Exception { IncidentTemplateForm incidentTemplateForm = createIncidentTemplateForm(); appRemotePresenter.saveIncidentForm(incidentTemplateForm); verify(incidentFormService, times(1)).saveOrUpdate(any(IncidentForm.class)); }