test_class.declarator: formRemoteService
test_class.modifier: private
test_class.original_string: private FormRemoteService formRemoteService;
test_class.type: FormRemoteService
test_class.var_name: formRemoteService
test_class.declarator: caseFormService
test_class.modifier: private
test_class.original_string: private CaseFormService caseFormService;
test_class.type: CaseFormService
test_class.var_name: caseFormService
test_class.declarator: tracingFormService
test_class.modifier: private
test_class.original_string: private TracingFormService tracingFormService;
test_class.type: TracingFormService
test_class.var_name: tracingFormService
test_class.declarator: incidentFormService
test_class.modifier: private
test_class.original_string: private IncidentFormService incidentFormService;
test_class.type: IncidentFormService
test_class.var_name: incidentFormService
test_class.declarator: systemSettingsService
test_class.modifier: private
test_class.original_string: private SystemSettingsService systemSettingsService;
test_class.type: SystemSettingsService
test_class.var_name: systemSettingsService
test_class.declarator: appRemotePresenter
test_class.modifier: private
test_class.original_string: private AppRemotePresenter appRemotePresenter;
test_class.type: AppRemotePresenter
test_class.var_name: appRemotePresenter
test_class.file: app/src/test/java/org/unicef/rapidreg/loadform/AppRemotePresenterTest.java
test_class.identifier: AppRemotePresenterTest
test_case.body: @Test
      public void should_load_tracing_form_when_give_cookie_and_module_id() throws Exception {
          TracingTemplateForm tracingTemplateForm = createTracingTemplateForm();
          Observable<TracingTemplateForm> observable = Observable.just(tracingTemplateForm);
          when(formRemoteService.getTracingForm("cookie", "en", true, "tracing_request", "primeromodule-cp"))
                  .thenReturn(observable);
          Mockito.when(PrimeroAppConfiguration.getCookie()).thenReturn("cookie");
          Mockito.when(PrimeroAppConfiguration.getDefaultLanguage()).thenReturn("en");
          AppRemoteService.LoadCallback callback = mock(AppRemoteService.LoadCallback.class);
          appRemotePresenter.loadTracingForm(callback);
  
          verify(tracingFormService, times(1)).saveOrUpdate(any(TracingForm.class));
          verify(callback, times(1)).onSuccess();
          verify(callback, never()).onFailure();
      }
test_case.class_method_signature: AppRemotePresenterTest.should_load_tracing_form_when_give_cookie_and_module_id()
test_case.full_signature: @Test public void should_load_tracing_form_when_give_cookie_and_module_id()
test_case.identifier: should_load_tracing_form_when_give_cookie_and_module_id
test_case.invocations: createTracingTemplateForm just thenReturn when getTracingForm thenReturn when getCookie thenReturn when getDefaultLanguage mock loadTracingForm saveOrUpdate verify times any onSuccess verify times onFailure verify never
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_load_tracing_form_when_give_cookie_and_module_id()
focal_class.declarator: TAG = AppRemotePresenter.class.getSimpleName()
focal_class.modifier: private static final
focal_class.original_string: private static final String TAG = AppRemotePresenter.class.getSimpleName();
focal_class.type: String
focal_class.var_name: TAG
focal_class.declarator: formRemoteService
focal_class.modifier: private
focal_class.original_string: private FormRemoteService formRemoteService;
focal_class.type: FormRemoteService
focal_class.var_name: formRemoteService
focal_class.declarator: caseFormService
focal_class.modifier: private
focal_class.original_string: private CaseFormService caseFormService;
focal_class.type: CaseFormService
focal_class.var_name: caseFormService
focal_class.declarator: tracingFormService
focal_class.modifier: private
focal_class.original_string: private TracingFormService tracingFormService;
focal_class.type: TracingFormService
focal_class.var_name: tracingFormService
focal_class.declarator: incidentFormService
focal_class.modifier: private
focal_class.original_string: private IncidentFormService incidentFormService;
focal_class.type: IncidentFormService
focal_class.var_name: incidentFormService
focal_class.declarator: systemSettingsService
focal_class.modifier: private
focal_class.original_string: private SystemSettingsService systemSettingsService;
focal_class.type: SystemSettingsService
focal_class.var_name: systemSettingsService
focal_class.declarator: gson = new Gson()
focal_class.modifier: protected final
focal_class.original_string: protected final Gson gson = new Gson();
focal_class.type: Gson
focal_class.var_name: gson
focal_class.file: app/src/main/java/org/unicef/rapidreg/loadform/AppRemotePresenter.java
focal_class.identifier: AppRemotePresenter
focal_class.class_method_signature: AppRemotePresenter.AppRemotePresenter(Lazy<FormRemoteService> formRemoteService,
                                CaseFormService caseFormService,
                                TracingFormService tracingFormService,
                                IncidentFormService incidentFormService,
                                Lazy<SystemSettingsService> systemSettingsService)
focal_class.full_signature: @Inject public  AppRemotePresenter(Lazy<FormRemoteService> formRemoteService,
                                CaseFormService caseFormService,
                                TracingFormService tracingFormService,
                                IncidentFormService incidentFormService,
                                Lazy<SystemSettingsService> systemSettingsService)
focal_class.identifier: AppRemotePresenter
focal_class.modifiers: @Inject public
focal_class.parameters: (Lazy<FormRemoteService> formRemoteService,
                                CaseFormService caseFormService,
                                TracingFormService tracingFormService,
                                IncidentFormService incidentFormService,
                                Lazy<SystemSettingsService> systemSettingsService)
focal_class.signature:  AppRemotePresenter(Lazy<FormRemoteService> formRemoteService,
                                CaseFormService caseFormService,
                                TracingFormService tracingFormService,
                                IncidentFormService incidentFormService,
                                Lazy<SystemSettingsService> systemSettingsService)
focal_class.class_method_signature: AppRemotePresenter.AppRemotePresenter(FormRemoteService formRemoteService,
                                CaseFormService caseFormService,
                                TracingFormService tracingFormService,
                                IncidentFormService incidentFormService,
                                SystemSettingsService systemSettingsService)
focal_class.full_signature: public  AppRemotePresenter(FormRemoteService formRemoteService,
                                CaseFormService caseFormService,
                                TracingFormService tracingFormService,
                                IncidentFormService incidentFormService,
                                SystemSettingsService systemSettingsService)
focal_class.identifier: AppRemotePresenter
focal_class.modifiers: public
focal_class.parameters: (FormRemoteService formRemoteService,
                                CaseFormService caseFormService,
                                TracingFormService tracingFormService,
                                IncidentFormService incidentFormService,
                                SystemSettingsService systemSettingsService)
focal_class.signature:  AppRemotePresenter(FormRemoteService formRemoteService,
                                CaseFormService caseFormService,
                                TracingFormService tracingFormService,
                                IncidentFormService incidentFormService,
                                SystemSettingsService systemSettingsService)
focal_class.class_method_signature: AppRemotePresenter.loadCaseForm(String moduleId, AppRemoteService.LoadCallback callback)
focal_class.full_signature: public void loadCaseForm(String moduleId, AppRemoteService.LoadCallback callback)
focal_class.identifier: loadCaseForm
focal_class.modifiers: public
focal_class.parameters: (String moduleId, AppRemoteService.LoadCallback callback)
focal_class.return: void
focal_class.signature: void loadCaseForm(String moduleId, AppRemoteService.LoadCallback callback)
focal_class.class_method_signature: AppRemotePresenter.saveCaseForm(RecordForm recordForm, String moduleId)
focal_class.full_signature: public void saveCaseForm(RecordForm recordForm, String moduleId)
focal_class.identifier: saveCaseForm
focal_class.modifiers: public
focal_class.parameters: (RecordForm recordForm, String moduleId)
focal_class.return: void
focal_class.signature: void saveCaseForm(RecordForm recordForm, String moduleId)
focal_class.class_method_signature: AppRemotePresenter.loadTracingForm(AppRemoteService.LoadCallback callback)
focal_class.full_signature: public void loadTracingForm(AppRemoteService.LoadCallback callback)
focal_class.identifier: loadTracingForm
focal_class.modifiers: public
focal_class.parameters: (AppRemoteService.LoadCallback callback)
focal_class.return: void
focal_class.signature: void loadTracingForm(AppRemoteService.LoadCallback callback)
focal_class.class_method_signature: AppRemotePresenter.saveTracingForm(RecordForm recordForm)
focal_class.full_signature: public void saveTracingForm(RecordForm recordForm)
focal_class.identifier: saveTracingForm
focal_class.modifiers: public
focal_class.parameters: (RecordForm recordForm)
focal_class.return: void
focal_class.signature: void saveTracingForm(RecordForm recordForm)
focal_class.class_method_signature: AppRemotePresenter.loadIncidentForm(AppRemoteService.LoadCallback callback)
focal_class.full_signature: public void loadIncidentForm(AppRemoteService.LoadCallback callback)
focal_class.identifier: loadIncidentForm
focal_class.modifiers: public
focal_class.parameters: (AppRemoteService.LoadCallback callback)
focal_class.return: void
focal_class.signature: void loadIncidentForm(AppRemoteService.LoadCallback callback)
focal_class.class_method_signature: AppRemotePresenter.saveIncidentForm(RecordForm recordForm)
focal_class.full_signature: public void saveIncidentForm(RecordForm recordForm)
focal_class.identifier: saveIncidentForm
focal_class.modifiers: public
focal_class.parameters: (RecordForm recordForm)
focal_class.return: void
focal_class.signature: void saveIncidentForm(RecordForm recordForm)
focal_class.class_method_signature: AppRemotePresenter.loadSystemSettings()
focal_class.full_signature: public void loadSystemSettings()
focal_class.identifier: loadSystemSettings
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void loadSystemSettings()
focal_method.body: public void loadTracingForm(AppRemoteService.LoadCallback callback) {
          formRemoteService.getTracingForm(PrimeroAppConfiguration.getCookie(), PrimeroAppConfiguration.getDefaultLanguage
                  (), true, PrimeroAppConfiguration.PARENT_TRACING_REQUEST, MODULE_ID_CP)
                  .subscribe(tracingForm -> {
                      saveTracingForm(tracingForm);
                      callback.onSuccess();
                  }, throwable -> callback.onFailure());
      }
focal_method.class_method_signature: AppRemotePresenter.loadTracingForm(AppRemoteService.LoadCallback callback)
focal_method.full_signature: public void loadTracingForm(AppRemoteService.LoadCallback callback)
focal_method.identifier: loadTracingForm
focal_method.invocations: subscribe getTracingForm getCookie getDefaultLanguage saveTracingForm onSuccess onFailure
focal_method.modifiers: public
focal_method.parameters: (AppRemoteService.LoadCallback callback)
focal_method.return: void
focal_method.signature: void loadTracingForm(AppRemoteService.LoadCallback callback)