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: tracingFormDao
test_class.modifier: private
test_class.original_string: private TracingFormDao tracingFormDao;
test_class.type: TracingFormDao
test_class.var_name: tracingFormDao
test_class.declarator: formForm = "{\n" +
              "  \"Enquiries\": [\n" +
              "    {\n" +
              "      \"order\": 10,\n" +
              "      \"fields\": [\n" +
              "        {\n" +
              "          \"name\": \"tracingworker_name\",\n" +
              "          \"type\": \"text_field\",\n" +
              "          \"editable\": true,\n" +
              "          \"multi_select\": false,\n" +
              "          \"mobile_visible\":true,\n" +
              "          \"show_on_minify_form\":true,\n" +
              "          \"required\":false,\n" +
              "          \"display_name\": {\n" +
              "            \"en\": \"Field/Tracing/Social Worker\"\n" +
              "          },\n" +
              "          \"help_text\": {\n" +
              "            \"en\": \"\"\n" +
              "          },\n" +
              "          \"option_strings_text\": {\n" +
              "            \"en\": []\n" +
              "          }\n" +
              "        }\n" +
              "      ],\n" +
              "      \"base_language\": \"en\",\n" +
              "      \"name\": {\n" +
              "        \"en\": \"Record Owner\"\n" +
              "      },\n" +
              "      \"help_text\": {\n" +
              "        \"en\": \"\"\n" +
              "      }\n" +
              "    }\n" +
              "  ]\n" +
              "}"
test_class.modifier: private
test_class.original_string: private String formForm = "{\n" +
              "  \"Enquiries\": [\n" +
              "    {\n" +
              "      \"order\": 10,\n" +
              "      \"fields\": [\n" +
              "        {\n" +
              "          \"name\": \"tracingworker_name\",\n" +
              "          \"type\": \"text_field\",\n" +
              "          \"editable\": true,\n" +
              "          \"multi_select\": false,\n" +
              "          \"mobile_visible\":true,\n" +
              "          \"show_on_minify_form\":true,\n" +
              "          \"required\":false,\n" +
              "          \"display_name\": {\n" +
              "            \"en\": \"Field/Tracing/Social Worker\"\n" +
              "          },\n" +
              "          \"help_text\": {\n" +
              "            \"en\": \"\"\n" +
              "          },\n" +
              "          \"option_strings_text\": {\n" +
              "            \"en\": []\n" +
              "          }\n" +
              "        }\n" +
              "      ],\n" +
              "      \"base_language\": \"en\",\n" +
              "      \"name\": {\n" +
              "        \"en\": \"Record Owner\"\n" +
              "      },\n" +
              "      \"help_text\": {\n" +
              "        \"en\": \"\"\n" +
              "      }\n" +
              "    }\n" +
              "  ]\n" +
              "}";
test_class.type: String
test_class.var_name: formForm
test_class.file: app/src/test/java/org/unicef/rapidreg/service/impl/TracingFormServiceImplTest.java
test_class.identifier: TracingFormServiceImplTest
test_case.body: @Test
      public void should_save_when_existing_tracing_form_is_null() {
          when(tracingFormDao.getTracingForm(anyString())).thenReturn(null);
          TracingForm tracingForm = mock(TracingForm.class);
          tracingFormService.saveOrUpdate(tracingForm);
          verify(tracingForm, times(1)).save();
      }
test_case.class_method_signature: TracingFormServiceImplTest.should_save_when_existing_tracing_form_is_null()
test_case.full_signature: @Test public void should_save_when_existing_tracing_form_is_null()
test_case.identifier: should_save_when_existing_tracing_form_is_null
test_case.invocations: thenReturn when getTracingForm anyString mock saveOrUpdate save verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_save_when_existing_tracing_form_is_null()
focal_class.declarator: TAG = TracingFormServiceImpl.class.getSimpleName()
focal_class.modifier: public static final
focal_class.original_string: public static final String TAG = TracingFormServiceImpl.class.getSimpleName();
focal_class.type: String
focal_class.var_name: TAG
focal_class.declarator: tracingFormDao
focal_class.modifier: private
focal_class.original_string: private TracingFormDao tracingFormDao;
focal_class.type: TracingFormDao
focal_class.var_name: tracingFormDao
focal_class.file: app/src/main/java/org/unicef/rapidreg/service/impl/TracingFormServiceImpl.java
focal_class.identifier: TracingFormServiceImpl
focal_class.interfaces: implements TracingFormService
focal_class.class_method_signature: TracingFormServiceImpl.TracingFormServiceImpl(TracingFormDao tracingFormDao)
focal_class.full_signature: public  TracingFormServiceImpl(TracingFormDao tracingFormDao)
focal_class.identifier: TracingFormServiceImpl
focal_class.modifiers: public
focal_class.parameters: (TracingFormDao tracingFormDao)
focal_class.signature:  TracingFormServiceImpl(TracingFormDao tracingFormDao)
focal_class.class_method_signature: TracingFormServiceImpl.isReady()
focal_class.full_signature: public boolean isReady()
focal_class.identifier: isReady
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isReady()
focal_class.class_method_signature: TracingFormServiceImpl.getCPTemplate()
focal_class.full_signature: public TracingTemplateForm getCPTemplate()
focal_class.identifier: getCPTemplate
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: TracingTemplateForm
focal_class.signature: TracingTemplateForm getCPTemplate()
focal_class.class_method_signature: TracingFormServiceImpl.saveOrUpdate(TracingForm tracingForm)
focal_class.full_signature: public void saveOrUpdate(TracingForm tracingForm)
focal_class.identifier: saveOrUpdate
focal_class.modifiers: public
focal_class.parameters: (TracingForm tracingForm)
focal_class.return: void
focal_class.signature: void saveOrUpdate(TracingForm tracingForm)
focal_method.body: public void saveOrUpdate(TracingForm tracingForm) {
          TracingForm existingTracingForm = tracingFormDao.getTracingForm(PrimeroAppConfiguration.getApiBaseUrl());
          if (existingTracingForm == null) {
              Log.d(TAG, "save new tracing form");
              tracingForm.setServerUrl(PrimeroAppConfiguration.getApiBaseUrl());
              tracingForm.save();
          } else {
              Log.d(TAG, "update existing tracing form");
              existingTracingForm.setForm(tracingForm.getForm());
              existingTracingForm.update();
          }
      }
focal_method.class_method_signature: TracingFormServiceImpl.saveOrUpdate(TracingForm tracingForm)
focal_method.full_signature: public void saveOrUpdate(TracingForm tracingForm)
focal_method.identifier: saveOrUpdate
focal_method.invocations: getTracingForm getApiBaseUrl d setServerUrl getApiBaseUrl save d setForm getForm update
focal_method.modifiers: public
focal_method.parameters: (TracingForm tracingForm)
focal_method.return: void
focal_method.signature: void saveOrUpdate(TracingForm tracingForm)