ServeHotspotGenerator { @VisibleForTesting @NotNull static String buildSourcesString(@NotNull Set<String> sources) { StringJoiner sourceJoiner = new StringJoiner(","); for (String source : sources) { sourceJoiner.add(source); } return sourceJoiner.toString(); }  static void main(String[] args);  }
@Test public void canJoinSources() { Set<String> sources = Sets.newTreeSet(Lists.newArrayList("SRC1", "SRC2", "SRC3")); assertEquals("SRC1,SRC2,SRC3", ServeHotspotGenerator.buildSourcesString(sources)); }