test_class.declarator: url = "http://35.61.56.113:8443"
test_class.modifier: private
test_class.original_string: private String url = "http://35.61.56.113:8443";
test_class.type: String
test_class.var_name: url
test_class.declarator: incidentDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      IncidentDao incidentDao;
test_class.type: IncidentDao
test_class.var_name: incidentDao
test_class.declarator: incidentService
test_class.modifier: @InjectMocks
test_class.original_string: @InjectMocks
      IncidentService incidentService;
test_class.type: IncidentService
test_class.var_name: incidentService
test_class.file: app/src/test/java/org/unicef/rapidreg/service/IncidentServiceTest.java
test_class.identifier: IncidentServiceTest
test_case.body: @Test
      public void should_delete_when_incident_exists_and_synced_yet() throws Exception {
          long recordId = 123L;
  
          Incident deleteIncident = new Incident(recordId);
          deleteIncident.setSynced(true);
          when(incidentDao.getIncidentById(recordId)).thenReturn(deleteIncident);
  
          Incident actual = incidentService.deleteByRecordId(recordId);
  
          verify(incidentDao, times(1)).delete(deleteIncident);
          assertThat(actual, is(deleteIncident));
      }
test_case.class_method_signature: IncidentServiceTest.should_delete_when_incident_exists_and_synced_yet()
test_case.full_signature: @Test public void should_delete_when_incident_exists_and_synced_yet()
test_case.identifier: should_delete_when_incident_exists_and_synced_yet
test_case.invocations: setSynced thenReturn when getIncidentById deleteByRecordId delete verify times assertThat is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_delete_when_incident_exists_and_synced_yet()
focal_class.declarator: TAG = IncidentService.class.getSimpleName()
focal_class.modifier: public static final
focal_class.original_string: public static final String TAG = IncidentService.class.getSimpleName();
focal_class.type: String
focal_class.var_name: TAG
focal_class.declarator: INCIDENT_DISPLAY_ID = "incident_id_display"
focal_class.modifier: public static final
focal_class.original_string: public static final String INCIDENT_DISPLAY_ID = "incident_id_display";
focal_class.type: String
focal_class.var_name: INCIDENT_DISPLAY_ID
focal_class.declarator: INCIDENT_ID = "incident_id"
focal_class.modifier: public static final
focal_class.original_string: public static final String INCIDENT_ID = "incident_id";
focal_class.type: String
focal_class.var_name: INCIDENT_ID
focal_class.declarator: INCIDENT_PRIMARY_ID = "incident_primary_id"
focal_class.modifier: public static final
focal_class.original_string: public static final String INCIDENT_PRIMARY_ID = "incident_primary_id";
focal_class.type: String
focal_class.var_name: INCIDENT_PRIMARY_ID
focal_class.declarator: EMPTY_ID = ""
focal_class.modifier: public static final
focal_class.original_string: public static final String EMPTY_ID = "";
focal_class.type: String
focal_class.var_name: EMPTY_ID
focal_class.declarator: incidentDao = new IncidentDaoImpl()
focal_class.modifier: private
focal_class.original_string: private IncidentDao incidentDao = new IncidentDaoImpl();
focal_class.type: IncidentDao
focal_class.var_name: incidentDao
focal_class.file: app/src/main/java/org/unicef/rapidreg/service/IncidentService.java
focal_class.identifier: IncidentService
focal_class.class_method_signature: IncidentService.IncidentService()
focal_class.full_signature: public  IncidentService()
focal_class.identifier: IncidentService
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  IncidentService()
focal_class.class_method_signature: IncidentService.IncidentService(IncidentDao incidentDao)
focal_class.full_signature: public  IncidentService(IncidentDao incidentDao)
focal_class.identifier: IncidentService
focal_class.modifiers: public
focal_class.parameters: (IncidentDao incidentDao)
focal_class.signature:  IncidentService(IncidentDao incidentDao)
focal_class.class_method_signature: IncidentService.getById(long incidentId)
focal_class.full_signature: public Incident getById(long incidentId)
focal_class.identifier: getById
focal_class.modifiers: public
focal_class.parameters: (long incidentId)
focal_class.return: Incident
focal_class.signature: Incident getById(long incidentId)
focal_class.class_method_signature: IncidentService.getByUniqueId(String uniqueId)
focal_class.full_signature: public Incident getByUniqueId(String uniqueId)
focal_class.identifier: getByUniqueId
focal_class.modifiers: public
focal_class.parameters: (String uniqueId)
focal_class.return: Incident
focal_class.signature: Incident getByUniqueId(String uniqueId)
focal_class.class_method_signature: IncidentService.getAll()
focal_class.full_signature: public List<Incident> getAll()
focal_class.identifier: getAll
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Incident>
focal_class.signature: List<Incident> getAll()
focal_class.class_method_signature: IncidentService.getAllOrderByDateASC()
focal_class.full_signature: public List<Long> getAllOrderByDateASC()
focal_class.identifier: getAllOrderByDateASC
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Long>
focal_class.signature: List<Long> getAllOrderByDateASC()
focal_class.class_method_signature: IncidentService.getAllOrderByDateDES()
focal_class.full_signature: public List<Long> getAllOrderByDateDES()
focal_class.identifier: getAllOrderByDateDES
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Long>
focal_class.signature: List<Long> getAllOrderByDateDES()
focal_class.class_method_signature: IncidentService.getAllOrderByAgeASC()
focal_class.full_signature: public List<Long> getAllOrderByAgeASC()
focal_class.identifier: getAllOrderByAgeASC
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Long>
focal_class.signature: List<Long> getAllOrderByAgeASC()
focal_class.class_method_signature: IncidentService.getAllOrderByAgeDES()
focal_class.full_signature: public List<Long> getAllOrderByAgeDES()
focal_class.identifier: getAllOrderByAgeDES
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Long>
focal_class.signature: List<Long> getAllOrderByAgeDES()
focal_class.class_method_signature: IncidentService.getSearchResult(String uniqueId, String survivorCode, int ageFrom, int ageTo, String
              typeOfViolence, String location)
focal_class.full_signature: public List<Long> getSearchResult(String uniqueId, String survivorCode, int ageFrom, int ageTo, String
              typeOfViolence, String location)
focal_class.identifier: getSearchResult
focal_class.modifiers: public
focal_class.parameters: (String uniqueId, String survivorCode, int ageFrom, int ageTo, String
              typeOfViolence, String location)
focal_class.return: List<Long>
focal_class.signature: List<Long> getSearchResult(String uniqueId, String survivorCode, int ageFrom, int ageTo, String
              typeOfViolence, String location)
focal_class.class_method_signature: IncidentService.getSearchCondition(String shortId, String survivorCode, int ageFrom, int ageTo, String
              typeOfViolence, String location)
focal_class.full_signature: private ConditionGroup getSearchCondition(String shortId, String survivorCode, int ageFrom, int ageTo, String
              typeOfViolence, String location)
focal_class.identifier: getSearchCondition
focal_class.modifiers: private
focal_class.parameters: (String shortId, String survivorCode, int ageFrom, int ageTo, String
              typeOfViolence, String location)
focal_class.return: ConditionGroup
focal_class.signature: ConditionGroup getSearchCondition(String shortId, String survivorCode, int ageFrom, int ageTo, String
              typeOfViolence, String location)
focal_class.class_method_signature: IncidentService.saveOrUpdate(ItemValuesMap itemValues)
focal_class.full_signature: public Incident saveOrUpdate(ItemValuesMap itemValues)
focal_class.identifier: saveOrUpdate
focal_class.modifiers: public
focal_class.parameters: (ItemValuesMap itemValues)
focal_class.return: Incident
focal_class.signature: Incident saveOrUpdate(ItemValuesMap itemValues)
focal_class.class_method_signature: IncidentService.save(ItemValuesMap itemValues)
focal_class.full_signature: public Incident save(ItemValuesMap itemValues)
focal_class.identifier: save
focal_class.modifiers: public
focal_class.parameters: (ItemValuesMap itemValues)
focal_class.return: Incident
focal_class.signature: Incident save(ItemValuesMap itemValues)
focal_class.class_method_signature: IncidentService.update(ItemValuesMap itemValues)
focal_class.full_signature: public Incident update(ItemValuesMap itemValues)
focal_class.identifier: update
focal_class.modifiers: public
focal_class.parameters: (ItemValuesMap itemValues)
focal_class.return: Incident
focal_class.signature: Incident update(ItemValuesMap itemValues)
focal_class.class_method_signature: IncidentService.deleteByRecordId(long recordId)
focal_class.full_signature: public Incident deleteByRecordId(long recordId)
focal_class.identifier: deleteByRecordId
focal_class.modifiers: public
focal_class.parameters: (long recordId)
focal_class.return: Incident
focal_class.signature: Incident deleteByRecordId(long recordId)
focal_class.class_method_signature: IncidentService.getName(ItemValuesMap values)
focal_class.full_signature: private String getName(ItemValuesMap values)
focal_class.identifier: getName
focal_class.modifiers: private
focal_class.parameters: (ItemValuesMap values)
focal_class.return: String
focal_class.signature: String getName(ItemValuesMap values)
focal_class.class_method_signature: IncidentService.getByInternalId(String id)
focal_class.full_signature: public Incident getByInternalId(String id)
focal_class.identifier: getByInternalId
focal_class.modifiers: public
focal_class.parameters: (String id)
focal_class.return: Incident
focal_class.signature: Incident getByInternalId(String id)
focal_class.class_method_signature: IncidentService.hasSameRev(String id, String rev)
focal_class.full_signature: public boolean hasSameRev(String id, String rev)
focal_class.identifier: hasSameRev
focal_class.modifiers: public
focal_class.parameters: (String id, String rev)
focal_class.return: boolean
focal_class.signature: boolean hasSameRev(String id, String rev)
focal_class.class_method_signature: IncidentService.getAllSyncedRecordsId()
focal_class.full_signature: public List<Long> getAllSyncedRecordsId()
focal_class.identifier: getAllSyncedRecordsId
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Long>
focal_class.signature: List<Long> getAllSyncedRecordsId()
focal_class.superclass: extends RecordService
focal_method.body: public Incident deleteByRecordId(long recordId) {
          Incident deleteIncident = incidentDao.getIncidentById(recordId);
          if (deleteIncident != null && !deleteIncident.isSynced()) {
              return null;
          }
          incidentDao.delete(deleteIncident);
          return deleteIncident;
      }
focal_method.class_method_signature: IncidentService.deleteByRecordId(long recordId)
focal_method.full_signature: public Incident deleteByRecordId(long recordId)
focal_method.identifier: deleteByRecordId
focal_method.invocations: getIncidentById isSynced delete
focal_method.modifiers: public
focal_method.parameters: (long recordId)
focal_method.return: Incident
focal_method.signature: Incident deleteByRecordId(long recordId)