LimsFactory { @NotNull @VisibleForTesting static Set<String> readSingleColumnTsv(@NotNull String tsv) throws IOException { return Files.lines(Paths.get(tsv)).filter(s -> !s.isEmpty()).collect(Collectors.toSet()); } private  LimsFactory(); @NotNull static Lims fromLimsDirectory(@NotNull String limsDirectory); @NotNull static Lims empty();  }
@Test public void readCorrectlyFromSamplesWithoutSamplingDateFile() throws IOException { Set<String> samplesWithoutSamplingDate = LimsFactory.readSingleColumnTsv(LIMS_DIRECTORY + File.separator + "samples_without_sampling_date.tsv"); assertEquals(2, samplesWithoutSamplingDate.size()); assertTrue(samplesWithoutSamplingDate.contains("SAMP01011234T")); assertFalse(samplesWithoutSamplingDate.contains("Does not exist")); }