@VisibleForTesting
    static boolean checkPipelinedPath(ExecNode<?> node, Set<ExecNode<?>> goals) {
        PipelinedPathChecker checker = new PipelinedPathChecker(goals);
        node.accept(checker);
        return checker.res;
    }
@Test
    void testCheckPipelinedPath() {
        // P = InputProperty.DamBehavior.PIPELINED, E = InputProperty.DamBehavior.END_INPUT B =
        // InputProperty.DamBehavior.BLOCKING
        //
        // 0 -P-> 1 ----E----\
        //         \-P-\      \
        // 2 ----E----> 3 -P-> 4
        // 5 -P-> 6 -B-/
        TestingBatchExecNode[] nodes = new TestingBatchExecNode[7];
        for (int i = 0; i < nodes.length; i++) {
            nodes[i] = new TestingBatchExecNode("TestingBatchExecNode" + i);
        }
        nodes[1].addInput(nodes[0]);
        nodes[3].addInput(nodes[1]);
        nodes[3].addInput(
                nodes[2],
                InputProperty.builder().damBehavior(InputProperty.DamBehavior.END_INPUT).build());
        nodes[3].addInput(
                nodes[6],
                InputProperty.builder().damBehavior(InputProperty.DamBehavior.BLOCKING).build());
        nodes[4].addInput(
                nodes[1],
                InputProperty.builder().damBehavior(InputProperty.DamBehavior.END_INPUT).build());
        nodes[4].addInput(nodes[3]);
        nodes[6].addInput(nodes[5]);

        assertThat(
                        InputOrderCalculator.checkPipelinedPath(
                                nodes[4],
                                new HashSet<>(Arrays.asList(nodes[2], nodes[5], nodes[6]))))
                .isFalse();
        assertThat(
                        InputOrderCalculator.checkPipelinedPath(
                                nodes[4], new HashSet<>(Arrays.asList(nodes[0], nodes[2]))))
                .isTrue();
    }