@Test void getSpiffeIdSetFromNonExistenFile_throwsException() throws IOException { Path path = Paths.get("testdata/spiffeid/non-existent-file"); try { SpiffeIdUtils.getSpiffeIdSetFromFile(path); fail("should have thrown exception"); } catch (NoSuchFileException e) { assertEquals("testdata/spiffeid/non-existent-file", e.getMessage()); } }
public static Set<SpiffeId> getSpiffeIdSetFromFile(final Path spiffeIdsFile) throws IOException { try (val lines = Files.lines(spiffeIdsFile)) { return lines .map(SpiffeId::parse) .collect(Collectors.toSet()); } }
SpiffeIdUtils { public static Set<SpiffeId> getSpiffeIdSetFromFile(final Path spiffeIdsFile) throws IOException { try (val lines = Files.lines(spiffeIdsFile)) { return lines .map(SpiffeId::parse) .collect(Collectors.toSet()); } } }
SpiffeIdUtils { public static Set<SpiffeId> getSpiffeIdSetFromFile(final Path spiffeIdsFile) throws IOException { try (val lines = Files.lines(spiffeIdsFile)) { return lines .map(SpiffeId::parse) .collect(Collectors.toSet()); } } private  SpiffeIdUtils(); }
SpiffeIdUtils { public static Set<SpiffeId> getSpiffeIdSetFromFile(final Path spiffeIdsFile) throws IOException { try (val lines = Files.lines(spiffeIdsFile)) { return lines .map(SpiffeId::parse) .collect(Collectors.toSet()); } } private  SpiffeIdUtils(); static Set<SpiffeId> getSpiffeIdSetFromFile(final Path spiffeIdsFile); static Set<SpiffeId> toSetOfSpiffeIds(final String spiffeIds, final char separator); static Set<SpiffeId> toSetOfSpiffeIds(final String spiffeIds); }
SpiffeIdUtils { public static Set<SpiffeId> getSpiffeIdSetFromFile(final Path spiffeIdsFile) throws IOException { try (val lines = Files.lines(spiffeIdsFile)) { return lines .map(SpiffeId::parse) .collect(Collectors.toSet()); } } private  SpiffeIdUtils(); static Set<SpiffeId> getSpiffeIdSetFromFile(final Path spiffeIdsFile); static Set<SpiffeId> toSetOfSpiffeIds(final String spiffeIds, final char separator); static Set<SpiffeId> toSetOfSpiffeIds(final String spiffeIds);  }