### Question:
SpiffeIdUtils { public static Set<SpiffeId> toSetOfSpiffeIds(final String spiffeIds, final char separator) { if (isBlank(spiffeIds)) { return Collections.emptySet(); } if (!SUPPORTED_SEPARATORS.contains(separator)) { throw new IllegalArgumentException("Separator character is not supported."); } val array = parseArray(spiffeIds, separator); return Arrays.stream(array) .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);  }### Answer:
@Test void toSetOfSpiffeIdsDefaultSeparator() { val spiffeIdsAsString = " spiffe: val spiffeIdSet = SpiffeIdUtils.toSetOfSpiffeIds(spiffeIdsAsString); assertNotNull(spiffeIdSet); assertEquals(2, spiffeIdSet.size()); assertTrue(spiffeIdSet.contains(SpiffeId.parse("spiffe: assertTrue(spiffeIdSet.contains(SpiffeId.parse("spiffe: }
@Test void toSetOfSpiffeIdsBlankSpaceSeparator() { val spiffeIdsAsString = " spiffe: val spiffeIdSet = SpiffeIdUtils.toSetOfSpiffeIds(spiffeIdsAsString, ' '); assertNotNull(spiffeIdSet); assertEquals(2, spiffeIdSet.size()); assertTrue(spiffeIdSet.contains(SpiffeId.parse("spiffe: assertTrue(spiffeIdSet.contains(SpiffeId.parse("spiffe: }
@Test void toSetOfSpiffeIdsInvalidSeparator() { val spiffeIdsAsString = " spiffe: try { SpiffeIdUtils.toSetOfSpiffeIds(spiffeIdsAsString, ','); fail(); } catch (IllegalArgumentException e) { assertEquals("Separator character is not supported.", e.getMessage()); } }
@Test void toSetOfSpiffeIdsNullString() { Set<SpiffeId> result = SpiffeIdUtils.toSetOfSpiffeIds(null); assertEquals(Collections.emptySet(), result); }
@Test void toSetOfSpiffeIdsBlankString() { Set<SpiffeId> result = SpiffeIdUtils.toSetOfSpiffeIds(""); assertEquals(Collections.emptySet(), result); }