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_get_tracing_form() throws IOException {
          TracingForm tracingForm = new TracingForm();
          tracingForm.setForm(new Blob(formForm.getBytes()));
          when(tracingFormDao.getTracingForm(PrimeroAppConfiguration.getApiBaseUrl())).thenReturn(tracingForm);
          TracingTemplateForm form = tracingFormService.getCPTemplate();
  
          assertThat(form.getSections().size(), is(1));
  
          Section section = form.getSections().get(0);
          assertThat(section.getName().get("en"), is("Record Owner"));
          assertThat(section.getOrder(), is(10));
          assertThat(section.getHelpText().get("en"), is(""));
          assertThat(section.getBaseLanguage(), is("en"));
  
          Field field = section.getFields().get(0);
          assertThat(field.getName(), is("tracingworker_name"));
          assertThat(field.getDisplayName().get("en"), is("Field/Tracing/Social Worker"));
          assertThat(field.getHelpText().get("en"), is(""));
          assertThat(field.getType(), is("text_field"));
          assertThat(field.getOptionStringsText().get("en").size(), is(0));
          assertThat(field.isShowOnMiniForm(), is(true));
          assertThat(field.isMultiSelect(), is(false));
          assertThat(field.isEditable(), is(true));
          assertThat(field.isRequired(), is(false));
          assertThat(field.getSubForm(), is(nullValue()));
      }
test_case.class_method_signature: TracingFormServiceImplTest.should_get_tracing_form()
test_case.full_signature: @Test public void should_get_tracing_form()
test_case.identifier: should_get_tracing_form
test_case.invocations: setForm getBytes thenReturn when getTracingForm getApiBaseUrl getCPTemplate assertThat size getSections is get getSections assertThat get getName is assertThat getOrder is assertThat get getHelpText is assertThat getBaseLanguage is get getFields assertThat getName is assertThat get getDisplayName is assertThat get getHelpText is assertThat getType is assertThat size get getOptionStringsText is assertThat isShowOnMiniForm is assertThat isMultiSelect is assertThat isEditable is assertThat isRequired is assertThat getSubForm is nullValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_get_tracing_form()
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 TracingTemplateForm getCPTemplate() {
          Blob form = tracingFormDao.getTracingForm(PrimeroAppConfiguration.getApiBaseUrl()).getForm();
          String formJson = new String(form.getBlob());
          if ("".equals(formJson)) {
              return null;
          }
          return new Gson().fromJson(formJson, TracingTemplateForm.class);
      }
focal_method.class_method_signature: TracingFormServiceImpl.getCPTemplate()
focal_method.full_signature: public TracingTemplateForm getCPTemplate()
focal_method.identifier: getCPTemplate
focal_method.invocations: getForm getTracingForm getApiBaseUrl getBlob equals fromJson
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: TracingTemplateForm
focal_method.signature: TracingTemplateForm getCPTemplate()