test_class.declarator: incidentService
test_class.modifier: @Mock
test_class.original_string: @Mock
      IncidentService incidentService;
test_class.type: IncidentService
test_class.var_name: incidentService
test_class.declarator: incidentFormService
test_class.modifier: @Mock
test_class.original_string: @Mock
      IncidentFormService incidentFormService;
test_class.type: IncidentFormService
test_class.var_name: incidentFormService
test_class.declarator: incidentRegisterPresenter
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private IncidentRegisterPresenter incidentRegisterPresenter;
test_class.type: IncidentRegisterPresenter
test_class.var_name: incidentRegisterPresenter
test_class.file: app/src/test/java/org/unicef/rapidreg/incident/incidentregister/IncidentRegisterPresenterTest.java
test_class.identifier: IncidentRegisterPresenterTest
test_case.body: @Test
      public void should_return_item_values_map_by_record_id() throws JSONException, ParseException {
          Long recordId = 1L;
          Incident incidentItem = new Incident();
          String uniqueId = "89fdj89r34jif9af90a";
          incidentItem.setContent(new Blob("{\"age\":\"12\"}".getBytes()));
  
          incidentItem.setUniqueId(uniqueId);
          SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd ");
          Date date = sdf.parse("2012-12-06 ");
  
          incidentItem.setRegistrationDate(date);
          when(incidentService.getById(recordId)).thenReturn(incidentItem);
  
          ItemValuesMap itemValuesMap = incidentRegisterPresenter.getItemValuesByRecordId(recordId);
  
          assertThat(itemValuesMap.getAsString("incident_id"), is("89fdj89r34jif9af90a"));
      }
test_case.class_method_signature: IncidentRegisterPresenterTest.should_return_item_values_map_by_record_id()
test_case.full_signature: @Test public void should_return_item_values_map_by_record_id()
test_case.identifier: should_return_item_values_map_by_record_id
test_case.invocations: setContent getBytes setUniqueId parse setRegistrationDate thenReturn when getById getItemValuesByRecordId assertThat getAsString is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_return_item_values_map_by_record_id()
focal_class.declarator: TAG = IncidentRegisterPresenter.class.getSimpleName()
focal_class.modifier: private static final
focal_class.original_string: private static final String TAG = IncidentRegisterPresenter.class.getSimpleName();
focal_class.type: String
focal_class.var_name: TAG
focal_class.declarator: incidentService
focal_class.modifier: private
focal_class.original_string: private IncidentService incidentService;
focal_class.type: IncidentService
focal_class.var_name: incidentService
focal_class.declarator: incidentFormService
focal_class.modifier: private
focal_class.original_string: private IncidentFormService incidentFormService;
focal_class.type: IncidentFormService
focal_class.var_name: incidentFormService
focal_class.file: app/src/main/java/org/unicef/rapidreg/incident/incidentregister/IncidentRegisterPresenter.java
focal_class.identifier: IncidentRegisterPresenter
focal_class.class_method_signature: IncidentRegisterPresenter.IncidentRegisterPresenter(IncidentService incidentService, IncidentFormService
              incidentFormService)
focal_class.full_signature: @Inject public  IncidentRegisterPresenter(IncidentService incidentService, IncidentFormService
              incidentFormService)
focal_class.identifier: IncidentRegisterPresenter
focal_class.modifiers: @Inject public
focal_class.parameters: (IncidentService incidentService, IncidentFormService
              incidentFormService)
focal_class.signature:  IncidentRegisterPresenter(IncidentService incidentService, IncidentFormService
              incidentFormService)
focal_class.class_method_signature: IncidentRegisterPresenter.getRecordId(Bundle bundle)
focal_class.full_signature: @Override protected Long getRecordId(Bundle bundle)
focal_class.identifier: getRecordId
focal_class.modifiers: @Override protected
focal_class.parameters: (Bundle bundle)
focal_class.return: Long
focal_class.signature: Long getRecordId(Bundle bundle)
focal_class.class_method_signature: IncidentRegisterPresenter.getUniqueId(Bundle bundle)
focal_class.full_signature: @Override protected String getUniqueId(Bundle bundle)
focal_class.identifier: getUniqueId
focal_class.modifiers: @Override protected
focal_class.parameters: (Bundle bundle)
focal_class.return: String
focal_class.signature: String getUniqueId(Bundle bundle)
focal_class.class_method_signature: IncidentRegisterPresenter.saveRecord(ItemValuesMap itemValuesMap, List<String> photoPaths,
                             RecordRegisterView.SaveRecordCallback callback)
focal_class.full_signature: @Override public void saveRecord(ItemValuesMap itemValuesMap, List<String> photoPaths,
                             RecordRegisterView.SaveRecordCallback callback)
focal_class.identifier: saveRecord
focal_class.modifiers: @Override public
focal_class.parameters: (ItemValuesMap itemValuesMap, List<String> photoPaths,
                             RecordRegisterView.SaveRecordCallback callback)
focal_class.return: void
focal_class.signature: void saveRecord(ItemValuesMap itemValuesMap, List<String> photoPaths,
                             RecordRegisterView.SaveRecordCallback callback)
focal_class.class_method_signature: IncidentRegisterPresenter.getItemValuesByRecordId(Long recordId)
focal_class.full_signature: @Override protected ItemValuesMap getItemValuesByRecordId(Long recordId)
focal_class.identifier: getItemValuesByRecordId
focal_class.modifiers: @Override protected
focal_class.parameters: (Long recordId)
focal_class.return: ItemValuesMap
focal_class.signature: ItemValuesMap getItemValuesByRecordId(Long recordId)
focal_class.class_method_signature: IncidentRegisterPresenter.getItemValuesByUniqueId(String uniqueId)
focal_class.full_signature: @Override protected ItemValuesMap getItemValuesByUniqueId(String uniqueId)
focal_class.identifier: getItemValuesByUniqueId
focal_class.modifiers: @Override protected
focal_class.parameters: (String uniqueId)
focal_class.return: ItemValuesMap
focal_class.signature: ItemValuesMap getItemValuesByUniqueId(String uniqueId)
focal_class.class_method_signature: IncidentRegisterPresenter.getPhotoPathsByRecordId(Long recordId)
focal_class.full_signature: @Override protected List<String> getPhotoPathsByRecordId(Long recordId)
focal_class.identifier: getPhotoPathsByRecordId
focal_class.modifiers: @Override protected
focal_class.parameters: (Long recordId)
focal_class.return: List<String>
focal_class.signature: List<String> getPhotoPathsByRecordId(Long recordId)
focal_class.class_method_signature: IncidentRegisterPresenter.getFields()
focal_class.full_signature: @Override protected List<Field> getFields()
focal_class.identifier: getFields
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: List<Field>
focal_class.signature: List<Field> getFields()
focal_class.class_method_signature: IncidentRegisterPresenter.getFields(int position)
focal_class.full_signature: @Override public List<Field> getFields(int position)
focal_class.identifier: getFields
focal_class.modifiers: @Override public
focal_class.parameters: (int position)
focal_class.return: List<Field>
focal_class.signature: List<Field> getFields(int position)
focal_class.class_method_signature: IncidentRegisterPresenter.getTemplateForm()
focal_class.full_signature: @Override public RecordForm getTemplateForm()
focal_class.identifier: getTemplateForm
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: RecordForm
focal_class.signature: RecordForm getTemplateForm()
focal_class.class_method_signature: IncidentRegisterPresenter.validateRequiredField(ItemValuesMap itemValuesMap)
focal_class.full_signature: private boolean validateRequiredField(ItemValuesMap itemValuesMap)
focal_class.identifier: validateRequiredField
focal_class.modifiers: private
focal_class.parameters: (ItemValuesMap itemValuesMap)
focal_class.return: boolean
focal_class.signature: boolean validateRequiredField(ItemValuesMap itemValuesMap)
focal_class.superclass: extends RecordRegisterPresenter
focal_method.body: @Override
      protected ItemValuesMap getItemValuesByRecordId(Long recordId) throws JSONException {
          Incident incidentItem = incidentService.getById(recordId);
          String incidentJson = new String(incidentItem.getContent().getBlob());
          final ItemValuesMap itemValues = new ItemValuesMap(JsonUtils.toMap(new Gson().fromJson
                  (incidentJson, JsonObject.class)));
          itemValues.addStringItem(IncidentService.INCIDENT_ID, incidentItem.getUniqueId());
  
          addProfileItems(itemValues, incidentItem.getRegistrationDate(),
                  incidentItem.getUniqueId(), null, recordId);
  
          return itemValues;
      }
focal_method.class_method_signature: IncidentRegisterPresenter.getItemValuesByRecordId(Long recordId)
focal_method.full_signature: @Override protected ItemValuesMap getItemValuesByRecordId(Long recordId)
focal_method.identifier: getItemValuesByRecordId
focal_method.invocations: getById getBlob getContent toMap fromJson addStringItem getUniqueId addProfileItems getRegistrationDate getUniqueId
focal_method.modifiers: @Override protected
focal_method.parameters: (Long recordId)
focal_method.return: ItemValuesMap
focal_method.signature: ItemValuesMap getItemValuesByRecordId(Long recordId)