public Set<String> terminalNodes() {
        return terminalNodes;
    }
@Test
    public void shouldGetTerminalNodes() {
        topology.addSource("source-1", "topic-1");
        topology.addSource("source-2", "topic-2", "topic-3");
        topology.addProcessor("processor-1", new MockApiProcessorSupplier<>(), "source-1");
        topology.addProcessor("processor-2", new MockApiProcessorSupplier<>(), "source-1", "source-2");
        topology.addSink("sink-1", "topic-3", "processor-1");

        final ProcessorTopology processorTopology = topology.getInternalBuilder("X").buildTopology();

        assertThat(processorTopology.terminalNodes(), equalTo(mkSet("processor-2", "sink-1")));
    }