IncidentRegisterPresenter extends RecordRegisterPresenter { @Override protected Long getRecordId(Bundle bundle) { return bundle.getLong(IncidentService.INCIDENT_PRIMARY_ID, RecordRegisterFragment .INVALID_RECORD_ID); } @Inject  IncidentRegisterPresenter(IncidentService incidentService, IncidentFormService
            incidentFormService); @Override void saveRecord(ItemValuesMap itemValuesMap, List<String> photoPaths,
                           RecordRegisterView.SaveRecordCallback callback); @Override List<Field> getFields(int position); @Override RecordForm getTemplateForm();  }
@Test public void should_return_record_id_when_get_record_id() { Bundle bundle = new Bundle(); bundle.putLong(IncidentService.INCIDENT_PRIMARY_ID, 2); assertThat(incidentRegisterPresenter.getRecordId(bundle), is(2L)); }
@Test public void should_return_default_record_id_when_get_record_id() { Bundle bundle = new Bundle(); assertThat(incidentRegisterPresenter.getRecordId(bundle), is(-100L)); }