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_return_true_if_form_is_ready() throws Exception {
          User user = new User();
          user.setRole(User.Role.CP.getValue());
          Mockito.when(PrimeroAppConfiguration.getCurrentUser()).thenReturn(user);
  
          CaseForm cpCaseForm = createCPCaseForm();
          when(caseFormDao.getCaseForm(PrimeroAppConfiguration.MODULE_ID_CP, PrimeroAppConfiguration.getApiBaseUrl()))
                  .thenReturn(cpCaseForm);
  
          assertTrue(caseFormService.isReady());
      }
test_case.class_method_signature: CaseFormServiceImplTest.should_return_true_if_form_is_ready()
test_case.full_signature: @Test public void should_return_true_if_form_is_ready()
test_case.identifier: should_return_true_if_form_is_ready
test_case.invocations: setRole getValue thenReturn when getCurrentUser createCPCaseForm thenReturn when getCaseForm getApiBaseUrl assertTrue isReady
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_return_true_if_form_is_ready()
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 boolean isReady() {
          User.Role roleType = PrimeroAppConfiguration.getCurrentUser().getRoleType();
          if (roleType == User.Role.CP) {
              return caseFormDao.getCaseForm(PrimeroAppConfiguration.MODULE_ID_CP, PrimeroAppConfiguration
                      .getApiBaseUrl()) != null && caseFormDao
                      .getCaseForm(PrimeroAppConfiguration.MODULE_ID_CP, PrimeroAppConfiguration.getApiBaseUrl())
                      .getForm() != null;
          }
          if (roleType == User.Role.GBV) {
              return caseFormDao.getCaseForm(PrimeroAppConfiguration.MODULE_ID_GBV, PrimeroAppConfiguration
                      .getApiBaseUrl()) != null &&
                      caseFormDao.getCaseForm(PrimeroAppConfiguration.MODULE_ID_GBV, PrimeroAppConfiguration
                              .getApiBaseUrl()).getForm() != null;
          }
          return caseFormDao.getCaseForm(PrimeroAppConfiguration.MODULE_ID_CP, PrimeroAppConfiguration.getApiBaseUrl()) != null && caseFormDao
                  .getCaseForm(PrimeroAppConfiguration.MODULE_ID_CP, PrimeroAppConfiguration.getApiBaseUrl()).getForm() != null;
      }
focal_method.class_method_signature: CaseFormServiceImpl.isReady()
focal_method.full_signature: public boolean isReady()
focal_method.identifier: isReady
focal_method.invocations: getRoleType getCurrentUser getCaseForm getApiBaseUrl getForm getCaseForm getApiBaseUrl getCaseForm getApiBaseUrl getForm getCaseForm getApiBaseUrl getCaseForm getApiBaseUrl getForm getCaseForm getApiBaseUrl
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: boolean
focal_method.signature: boolean isReady()