@Test public void fetchDocumentOrganizations() { when(documentProjectFetcher.fetchDocumentProjects()).thenReturn(documentProject); when(projectOrganizationReader.readProjectOrganizations(sc, projOrgPath)).thenReturn(projectOrganization); when(documentOrganizationCombiner.combine(documentProject, projectOrganization, docProjConfidenceLevelThreshold)).thenReturn(documentOrganizations); JavaRDD<AffMatchDocumentOrganization> retDocumentOrganizations = documentOrganizationFetcher.fetchDocumentOrganizations(); assertTrue(retDocumentOrganizations == documentOrganizations); verify(documentProjectFetcher).fetchDocumentProjects(); verify(projectOrganizationReader).readProjectOrganizations(sc, projOrgPath); verify(documentOrganizationCombiner).combine(documentProject, projectOrganization, docProjConfidenceLevelThreshold); }
public JavaRDD<AffMatchDocumentOrganization> fetchDocumentOrganizations() { JavaRDD<AffMatchDocumentProject> docProj = documentProjectFetcher.fetchDocumentProjects(); JavaRDD<AffMatchProjectOrganization> projOrg = projectOrganizationReader.readProjectOrganizations(sparkContext, projOrgPath); JavaRDD<AffMatchDocumentOrganization> docOrg = documentOrganizationCombiner.combine(docProj, projOrg, docProjConfidenceLevelThreshold); return docOrg; }
DocumentOrganizationFetcher implements Serializable { public JavaRDD<AffMatchDocumentOrganization> fetchDocumentOrganizations() { JavaRDD<AffMatchDocumentProject> docProj = documentProjectFetcher.fetchDocumentProjects(); JavaRDD<AffMatchProjectOrganization> projOrg = projectOrganizationReader.readProjectOrganizations(sparkContext, projOrgPath); JavaRDD<AffMatchDocumentOrganization> docOrg = documentOrganizationCombiner.combine(docProj, projOrg, docProjConfidenceLevelThreshold); return docOrg; } }
DocumentOrganizationFetcher implements Serializable { public JavaRDD<AffMatchDocumentOrganization> fetchDocumentOrganizations() { JavaRDD<AffMatchDocumentProject> docProj = documentProjectFetcher.fetchDocumentProjects(); JavaRDD<AffMatchProjectOrganization> projOrg = projectOrganizationReader.readProjectOrganizations(sparkContext, projOrgPath); JavaRDD<AffMatchDocumentOrganization> docOrg = documentOrganizationCombiner.combine(docProj, projOrg, docProjConfidenceLevelThreshold); return docOrg; }  }
DocumentOrganizationFetcher implements Serializable { public JavaRDD<AffMatchDocumentOrganization> fetchDocumentOrganizations() { JavaRDD<AffMatchDocumentProject> docProj = documentProjectFetcher.fetchDocumentProjects(); JavaRDD<AffMatchProjectOrganization> projOrg = projectOrganizationReader.readProjectOrganizations(sparkContext, projOrgPath); JavaRDD<AffMatchDocumentOrganization> docOrg = documentOrganizationCombiner.combine(docProj, projOrg, docProjConfidenceLevelThreshold); return docOrg; }  JavaRDD<AffMatchDocumentOrganization> fetchDocumentOrganizations(); void setProjectOrganizationReader(ProjectOrganizationReader projectOrganizationReader); void setDocumentProjectFetcher(DocumentProjectFetcher documentProjectFetcher); void setDocumentOrganizationCombiner(DocumentOrganizationCombiner documentOrganizationCombiner); void setDocProjConfidenceLevelThreshold(Float docProjConfidenceLevelThreshold); void setSparkContext(JavaSparkContext sparkContext); void setProjOrgPath(String projOrgPath); }
DocumentOrganizationFetcher implements Serializable { public JavaRDD<AffMatchDocumentOrganization> fetchDocumentOrganizations() { JavaRDD<AffMatchDocumentProject> docProj = documentProjectFetcher.fetchDocumentProjects(); JavaRDD<AffMatchProjectOrganization> projOrg = projectOrganizationReader.readProjectOrganizations(sparkContext, projOrgPath); JavaRDD<AffMatchDocumentOrganization> docOrg = documentOrganizationCombiner.combine(docProj, projOrg, docProjConfidenceLevelThreshold); return docOrg; }  JavaRDD<AffMatchDocumentOrganization> fetchDocumentOrganizations(); void setProjectOrganizationReader(ProjectOrganizationReader projectOrganizationReader); void setDocumentProjectFetcher(DocumentProjectFetcher documentProjectFetcher); void setDocumentOrganizationCombiner(DocumentOrganizationCombiner documentOrganizationCombiner); void setDocProjConfidenceLevelThreshold(Float docProjConfidenceLevelThreshold); void setSparkContext(JavaSparkContext sparkContext); void setProjOrgPath(String projOrgPath);  }