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_get_fields_from_incident_form_sections() {
          Field miniFormField = mock(Field.class);
          Field otherFormField = mock(Field.class);
          Section section = mock(Section.class);
          IncidentTemplateForm incidentTemplateForm = mock(IncidentTemplateForm.class);
  
          List<Field> fields = Arrays.asList(new Field[]{miniFormField, otherFormField});
          List<Section> sections = Arrays.asList(new Section[]{section});
  
          when(miniFormField.isShowOnMiniForm()).thenReturn(true);
          when(miniFormField.isPhotoUploadBox()).thenReturn(false);
          when(otherFormField.isShowOnMiniForm()).thenReturn(false);
  
          when(section.getFields()).thenReturn(fields);
          when(incidentTemplateForm.getSections()).thenReturn(sections);
          when(incidentFormService.getGBVTemplate()).thenReturn(incidentTemplateForm);
  
          List<Field> actual = incidentRegisterPresenter.getFields();
  
          assertThat("Should contain mini form field", actual.contains(miniFormField), is(true));
          assertThat("Should not contain full form field", actual.contains(otherFormField), is
                  (false));
          verify(incidentFormService, times(1)).getGBVTemplate();
  
      }
test_case.class_method_signature: IncidentRegisterPresenterTest.should_return_get_fields_from_incident_form_sections()
test_case.full_signature: @Test public void should_return_get_fields_from_incident_form_sections()
test_case.identifier: should_return_get_fields_from_incident_form_sections
test_case.invocations: mock mock mock mock asList asList thenReturn when isShowOnMiniForm thenReturn when isPhotoUploadBox thenReturn when isShowOnMiniForm thenReturn when getFields thenReturn when getSections thenReturn when getGBVTemplate getFields assertThat contains is assertThat contains is getGBVTemplate verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_return_get_fields_from_incident_form_sections()
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 List<Field> getFields() {
          List<Field> fields = new ArrayList<>();
  
          RecordForm form = incidentFormService.getGBVTemplate();
  
          List<Section> sections = form.getSections();
  
          for (Section section : sections) {
              for (Field field : section.getFields()) {
                  field.setSectionName(section.getName());
                  if (field.isShowOnMiniForm()) {
                      if (field.isPhotoUploadBox()) {
                          fields.add(0, field);
                      } else {
                          fields.add(field);
                      }
                  }
              }
          }
          return fields;
      }
focal_method.class_method_signature: IncidentRegisterPresenter.getFields()
focal_method.full_signature: @Override protected List<Field> getFields()
focal_method.identifier: getFields
focal_method.invocations: getGBVTemplate getSections getFields setSectionName getName isShowOnMiniForm isPhotoUploadBox add add
focal_method.modifiers: @Override protected
focal_method.parameters: ()
focal_method.return: List<Field>
focal_method.signature: List<Field> getFields()