### Question:
TopologyUtils { public static Set<String> getSinkTopics(final TopologyDescription topology) { final Set<String> topics = new HashSet<>(); topology.subtopologies().forEach(sub -> sub.nodes().forEach(n -> { if (n instanceof TopologyDescription.Sink) { topics.add(((TopologyDescription.Sink) n).topic()); } }) ); return topics; }  static Set<String> getSourceTopics(final TopologyDescription topology); static Set<String> getSinkTopics(final TopologyDescription topology); static Set<String> getUserDeclaredTopics(final TopologyDescription topology); static boolean isInternalTopic(final String applicationId,
                                          final String topic); static boolean isInternalTopic(final String topic);  }### Answer:
@Test public void shouldReturnOnlySinkTopics() { Set<String> userTopics = getSinkTopics(topology.describe()); assertEquals(2, userTopics.size()); assertTrue(Arrays.asList("output-topic", REPARTITION_TOPIC).containsAll(userTopics)); }