private void getNodesByType(
        final GraphNode currentNode,
        final Class<? extends GraphNode> clazz,
        final Set<GraphNode> visited,
        final List<GraphNode> result) {

        if (clazz.isAssignableFrom(currentNode.getClass())) {
            result.add(currentNode);
        }
        for (final GraphNode child: currentNode.children()) {
            if (!visited.contains(child)) {
                visited.add(child);
                getNodesByType(child, clazz, visited, result);
            }
        }
    }
The join node has two parents and the graph looks like:
root ---> source (t1)
source ---> map , windowed-4, join
map ---> windowed-3, join
streams/src/test/java/org/apache/kafka/streams/kstream/internals/InternalStreamsBuilderTest.java