BioentityPropertiesSource { Stream<ReactomePropertyFile> getReactomePropertyFiles() { return getBioentityPropertyFiles(reactomeDirPath, PATTERN, ReactomePropertyFile::new); } BioentityPropertiesSource(Path annotationsDirPath,
                                     Path arrayDesignsDirPath,
                                     Path reactomeDirPath,
                                     SpeciesFactory speciesFactory);   }
@Test public void reactomeTypicalFile() throws Exception { addTemporaryFile( "reactome", "Homo_sapiens.reactome.tsv", ImmutableList.of( new String[]{"ensgene", "pathwayid", "pathwayname"}, new String[]{"ENSG00000000419", "R-HSA-162699", "Synthesis of dolichyl-phosphate mannose"})); assertThat( subject.getReactomePropertyFiles() .flatMap(BioentityPropertiesSource.ReactomePropertyFile::get) .collect(toList()), containsInAnyOrder( new BioentityProperty( "ENSG00000000419", "Homo_sapiens", PATHWAYID.name, "R-HSA-162699"), new BioentityProperty( "ENSG00000000419", "Homo_sapiens", PATHWAYNAME.name, "Synthesis of dolichyl-phosphate mannose"))); }
@Test public void reactomeHeaderIsIgnored() throws Exception { addTemporaryFile( "reactome", "Homo_sapiens.reactome.tsv", ImmutableList.of( new String[]{"header", "is", "ignored"}, new String[]{"ENSG00000000419", "R-HSA-162699", "Synthesis of dolichyl-phosphate mannose"})); assertThat( subject.getReactomePropertyFiles() .flatMap(BioentityPropertiesSource.ReactomePropertyFile::get) .collect(toList()), containsInAnyOrder( new BioentityProperty( "ENSG00000000419", "Homo_sapiens", PATHWAYID.name, "R-HSA-162699"), new BioentityProperty( "ENSG00000000419", "Homo_sapiens", PATHWAYNAME.name, "Synthesis of dolichyl-phosphate mannose"))); }