AppRemotePresenter { public void saveCaseForm(RecordForm recordForm, String moduleId) { Blob caseFormBlob = new Blob(gson.toJson(recordForm).getBytes()); CaseForm caseForm = new CaseForm(caseFormBlob); caseForm.setModuleId(moduleId); caseFormService.saveOrUpdate(caseForm); } @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_record_form_and_module_id() throws Exception { CaseTemplateForm caseTemplateForm = createCaseTemplateForm(); String moduleId = "primeromodule-cp"; appRemotePresenter.saveCaseForm(caseTemplateForm, moduleId); verify(caseFormService, times(1)).saveOrUpdate(any(CaseForm.class)); }