test_class.declarator: caseService
test_class.modifier: @Mock
test_class.original_string: @Mock
      CaseService caseService;
test_class.type: CaseService
test_class.var_name: caseService
test_class.declarator: caseSearchPresenter
test_class.modifier: @InjectMocks
test_class.original_string: @InjectMocks
      CaseSearchPresenter caseSearchPresenter;
test_class.type: CaseSearchPresenter
test_class.var_name: caseSearchPresenter
test_class.file: app/src/test/java/org/unicef/rapidreg/childcase/casesearch/CaseSearchPresenterTest.java
test_class.identifier: CaseSearchPresenterTest
test_case.body: @Test
      public void should_get_GBV_search_result() throws Exception {
          List<Long> list = new ArrayList<>();
          User user = new User();
          user.setRole(User.ROLE_GBV);
  
          when(PrimeroAppConfiguration.getCurrentUser()).thenReturn(user);
          when(caseService.getGBVSearchResult(anyString(),anyString(),anyString(),any()))
                  .thenReturn(list);
  
          assertThat("Should return GBV search list", caseSearchPresenter.getSearchResult(Collections.emptyMap()),
                  is(list));
          verify(caseService, times(1)).getGBVSearchResult(anyString(),anyString(),anyString(),any());
      }
test_case.class_method_signature: CaseSearchPresenterTest.should_get_GBV_search_result()
test_case.full_signature: @Test public void should_get_GBV_search_result()
test_case.identifier: should_get_GBV_search_result
test_case.invocations: setRole thenReturn when getCurrentUser thenReturn when getGBVSearchResult anyString anyString anyString any assertThat getSearchResult emptyMap is getGBVSearchResult verify times anyString anyString anyString any
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_get_GBV_search_result()
focal_class.declarator: caseService
focal_class.modifier: private
focal_class.original_string: private CaseService caseService;
focal_class.type: CaseService
focal_class.var_name: caseService
focal_class.file: app/src/main/java/org/unicef/rapidreg/childcase/casesearch/CaseSearchPresenter.java
focal_class.identifier: CaseSearchPresenter
focal_class.class_method_signature: CaseSearchPresenter.CaseSearchPresenter(CaseService caseService)
focal_class.full_signature: @Inject public  CaseSearchPresenter(CaseService caseService)
focal_class.identifier: CaseSearchPresenter
focal_class.modifiers: @Inject public
focal_class.parameters: (CaseService caseService)
focal_class.signature:  CaseSearchPresenter(CaseService caseService)
focal_class.class_method_signature: CaseSearchPresenter.getSearchResult(Map<String, String> searchConditions)
focal_class.full_signature: @Override protected List<Long> getSearchResult(Map<String, String> searchConditions)
focal_class.identifier: getSearchResult
focal_class.modifiers: @Override protected
focal_class.parameters: (Map<String, String> searchConditions)
focal_class.return: List<Long>
focal_class.signature: List<Long> getSearchResult(Map<String, String> searchConditions)
focal_class.superclass: extends RecordSearchPresenter
focal_method.body: @Override
      protected List<Long> getSearchResult(Map<String, String> searchConditions) {
          String uniqueId = searchConditions.get(ID);
          String name = searchConditions.get(NAME);
          String registrationDate = searchConditions.get(REGISTRATION_DATE);
          if (PrimeroAppConfiguration.getCurrentUser().getRoleType() == User.Role.CP) {
              int ageFrom = Integer.valueOf(searchConditions.get(AGE_FROM));
              int ageTo = Integer.valueOf(searchConditions.get(AGE_TO));
              String caregiver = searchConditions.get(CAREGIVER);
              return caseService.getCPSearchResult(uniqueId, name, ageFrom, ageTo, caregiver, getDate(registrationDate));
          } else {
              String location = searchConditions.get(LOCATION);
              return caseService.getGBVSearchResult(uniqueId, name, location, getDate(registrationDate));
          }
      }
focal_method.class_method_signature: CaseSearchPresenter.getSearchResult(Map<String, String> searchConditions)
focal_method.full_signature: @Override protected List<Long> getSearchResult(Map<String, String> searchConditions)
focal_method.identifier: getSearchResult
focal_method.invocations: get get get getRoleType getCurrentUser valueOf get valueOf get get getCPSearchResult getDate get getGBVSearchResult getDate
focal_method.modifiers: @Override protected
focal_method.parameters: (Map<String, String> searchConditions)
focal_method.return: List<Long>
focal_method.signature: List<Long> getSearchResult(Map<String, String> searchConditions)