test_class.declarator: MAX_RETRY_NUM = 3
test_class.modifier: private static final
test_class.original_string: private static final int MAX_RETRY_NUM = 3;
test_class.type: int
test_class.var_name: MAX_RETRY_NUM
test_class.declarator: caseFormDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      CaseFormDao caseFormDao;
test_class.type: CaseFormDao
test_class.var_name: caseFormDao
test_class.declarator: caseFormService
test_class.modifier: @InjectMocks
test_class.original_string: @InjectMocks
      CaseFormServiceImpl caseFormService;
test_class.type: CaseFormServiceImpl
test_class.var_name: caseFormService
test_class.declarator: formForm = "{\n" +
              "  \"Children\": [\n" +
              "    {\n" +
              "      \"order\": 10,\n" +
              "      \"fields\": [\n" +
              "        {\n" +
              "          \"name\": \"case_id\",\n" +
              "          \"type\": \"text_field\",\n" +
              "          \"editable\": false,\n" +
              "          \"multi_select\": false,\n" +
              "          \"display_name\": {\n" +
              "            \"en\": \"Long ID\"\n" +
              "          },\n" +
              "          \"help_text\": {\n" +
              "            \"en\": \"\"\n" +
              "          },\n" +
              "          \"option_strings_text\": {\n" +
              "            \"en\": []\n" +
              "          }\n" +
              "        }\n" +
              "      ],\n" +
              "      \"base_language\": \"en\",\n" +
              "      \"name\": {\n" +
              "        \"en\": \"Basic Identity\"\n" +
              "      },\n" +
              "      \"help_text\": {\n" +
              "        \"en\": \"\"\n" +
              "      }\n" +
              "    }\n" +
              "  ]\n" +
              "}"
test_class.modifier: private
test_class.original_string: private String formForm = "{\n" +
              "  \"Children\": [\n" +
              "    {\n" +
              "      \"order\": 10,\n" +
              "      \"fields\": [\n" +
              "        {\n" +
              "          \"name\": \"case_id\",\n" +
              "          \"type\": \"text_field\",\n" +
              "          \"editable\": false,\n" +
              "          \"multi_select\": false,\n" +
              "          \"display_name\": {\n" +
              "            \"en\": \"Long ID\"\n" +
              "          },\n" +
              "          \"help_text\": {\n" +
              "            \"en\": \"\"\n" +
              "          },\n" +
              "          \"option_strings_text\": {\n" +
              "            \"en\": []\n" +
              "          }\n" +
              "        }\n" +
              "      ],\n" +
              "      \"base_language\": \"en\",\n" +
              "      \"name\": {\n" +
              "        \"en\": \"Basic Identity\"\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/CaseFormServiceImplTest.java
test_class.identifier: CaseFormServiceImplTest
test_case.body: @Test
      public void should_save_case_form_if_not_exist() throws Exception {
          CaseForm caseForm = mock(CaseForm.class);
          when(caseFormDao.getCaseForm("primeromodule-cp", PrimeroAppConfiguration.getApiBaseUrl())).thenReturn(null);
  
          caseFormService.saveOrUpdate(caseForm);
  
          verify(caseForm, times(1)).save();
      }
test_case.class_method_signature: CaseFormServiceImplTest.should_save_case_form_if_not_exist()
test_case.full_signature: @Test public void should_save_case_form_if_not_exist()
test_case.identifier: should_save_case_form_if_not_exist
test_case.invocations: mock thenReturn when getCaseForm getApiBaseUrl saveOrUpdate save verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_save_case_form_if_not_exist()
focal_class.declarator: TAG = CaseFormService.class.getSimpleName()
focal_class.modifier: public static final
focal_class.original_string: public static final String TAG = CaseFormService.class.getSimpleName();
focal_class.type: String
focal_class.var_name: TAG
focal_class.declarator: caseFormDao
focal_class.modifier: private
focal_class.original_string: private CaseFormDao caseFormDao;
focal_class.type: CaseFormDao
focal_class.var_name: caseFormDao
focal_class.file: app/src/main/java/org/unicef/rapidreg/service/impl/CaseFormServiceImpl.java
focal_class.identifier: CaseFormServiceImpl
focal_class.interfaces: implements CaseFormService
focal_class.class_method_signature: CaseFormServiceImpl.CaseFormServiceImpl(CaseFormDao caseFormDao)
focal_class.full_signature: public  CaseFormServiceImpl(CaseFormDao caseFormDao)
focal_class.identifier: CaseFormServiceImpl
focal_class.modifiers: public
focal_class.parameters: (CaseFormDao caseFormDao)
focal_class.signature:  CaseFormServiceImpl(CaseFormDao caseFormDao)
focal_class.class_method_signature: CaseFormServiceImpl.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: CaseFormServiceImpl.getCPTemplate()
focal_class.full_signature: public CaseTemplateForm getCPTemplate()
focal_class.identifier: getCPTemplate
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: CaseTemplateForm
focal_class.signature: CaseTemplateForm getCPTemplate()
focal_class.class_method_signature: CaseFormServiceImpl.getGBVTemplate()
focal_class.full_signature: @Override public CaseTemplateForm getGBVTemplate()
focal_class.identifier: getGBVTemplate
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: CaseTemplateForm
focal_class.signature: CaseTemplateForm getGBVTemplate()
focal_class.class_method_signature: CaseFormServiceImpl.getCaseTemplateForm(Blob form)
focal_class.full_signature: private CaseTemplateForm getCaseTemplateForm(Blob form)
focal_class.identifier: getCaseTemplateForm
focal_class.modifiers: private
focal_class.parameters: (Blob form)
focal_class.return: CaseTemplateForm
focal_class.signature: CaseTemplateForm getCaseTemplateForm(Blob form)
focal_class.class_method_signature: CaseFormServiceImpl.saveOrUpdate(CaseForm caseForm)
focal_class.full_signature: public void saveOrUpdate(CaseForm caseForm)
focal_class.identifier: saveOrUpdate
focal_class.modifiers: public
focal_class.parameters: (CaseForm caseForm)
focal_class.return: void
focal_class.signature: void saveOrUpdate(CaseForm caseForm)
focal_method.body: public void saveOrUpdate(CaseForm caseForm) {
          CaseForm existingCaseForm = caseFormDao.getCaseForm(caseForm.getModuleId(), PrimeroAppConfiguration
                  .getApiBaseUrl());
          if (existingCaseForm == null) {
              caseForm.setServerUrl(PrimeroAppConfiguration.getApiBaseUrl());
              caseForm.save();
          } else {
              existingCaseForm.setForm(caseForm.getForm());
              existingCaseForm.update();
          }
      }
focal_method.class_method_signature: CaseFormServiceImpl.saveOrUpdate(CaseForm caseForm)
focal_method.full_signature: public void saveOrUpdate(CaseForm caseForm)
focal_method.identifier: saveOrUpdate
focal_method.invocations: getCaseForm getModuleId getApiBaseUrl setServerUrl getApiBaseUrl save setForm getForm update
focal_method.modifiers: public
focal_method.parameters: (CaseForm caseForm)
focal_method.return: void
focal_method.signature: void saveOrUpdate(CaseForm caseForm)