@Test public void indexGetReporterIsNull() throws IOException, SolrServerException { Set<Feature> patientFeatures = new HashSet<>(); Feature testFeature = mock(Feature.class); patientFeatures.add(testFeature); EntityAccess entityAccess = mock(DefaultEntityAccess.class); Visibility patientVisibility = new PublicVisibility(); CapturingMatcher<SolrInputDocument> capturedArgument = new CapturingMatcher<>(); when(this.server.add(argThat(capturedArgument))).thenReturn(mock(UpdateResponse.class)); doReturn(this.patientDocReference).when(this.patient).getDocumentReference(); doReturn(null).when(this.patient).getReporter(); doReturn(patientFeatures).when(this.patient).getFeatures(); doReturn(true).when(testFeature).isPresent(); doReturn("phenotype").when(testFeature).getType(); doReturn("id").when(testFeature).getId(); doReturn(entityAccess).when(this.permissions).getEntityAccess(this.patient); doReturn(patientVisibility).when(entityAccess).getVisibility(); this.patientIndexer.index(this.patient); SolrInputDocument inputDoc = capturedArgument.getLastValue(); verify(this.server).add(inputDoc); Assert.assertEquals(inputDoc.getFieldValue("reporter"), ""); }
@Override public void index(Patient patient) { this.internalIndex(patient, true); }
SolrPatientIndexer implements PatientIndexer, Initializable { @Override public void index(Patient patient) { this.internalIndex(patient, true); } }
SolrPatientIndexer implements PatientIndexer, Initializable { @Override public void index(Patient patient) { this.internalIndex(patient, true); }  }
SolrPatientIndexer implements PatientIndexer, Initializable { @Override public void index(Patient patient) { this.internalIndex(patient, true); }  @Override void initialize(); @Override void index(Patient patient); @Override void delete(Patient patient); @Override void reindex(); }
SolrPatientIndexer implements PatientIndexer, Initializable { @Override public void index(Patient patient) { this.internalIndex(patient, true); }  @Override void initialize(); @Override void index(Patient patient); @Override void delete(Patient patient); @Override void reindex();  }