private GraphNode getNodeByType(
        final GraphNode currentNode,
        final Class<? extends GraphNode> clazz,
        final Set<GraphNode> visited) {

        if (clazz.isAssignableFrom(currentNode.getClass())) {
            return currentNode;
        }
        for (final GraphNode child: currentNode.children()) {
            if (!visited.contains(child)) {
                visited.add(child);
            }
            final GraphNode result = getNodeByType(child, clazz, visited);
            if (result != null) {
                return result;
            }
        }
        return null;
    }
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