public static long findAndVerifyWindowGrace(final GraphNode graphNode) {
        return findAndVerifyWindowGrace(graphNode, "");
    }
@Test
    public void shouldExtractGraceFromSessionAncestorThroughStatefulParent() {
        final SessionWindows windows = SessionWindows.ofInactivityGapAndGrace(ofMillis(10L), ofMillis(1234L));
        final StatefulProcessorNode<String, Long> graceGrandparent = new StatefulProcessorNode<>(
            "asdf",
            new ProcessorParameters<>(new KStreamSessionWindowAggregate<String, Long, Integer>(
                windows, "asdf", EmitStrategy.onWindowUpdate(), null, null, null
            ), "asdf"),
            (StoreFactory) null
        );

        final StatefulProcessorNode<String, Long> statefulParent = new StatefulProcessorNode<>(
            "stateful",
            new ProcessorParameters<>(
                () -> new Processor<String, Long, String, Long>() {

                    @Override
                    public void process(final Record<String, Long> record) {}

                },
                "dummy"
            ),
            (StoreFactory) null
        );
        graceGrandparent.addChild(statefulParent);

        final ProcessorGraphNode<String, Long> node = new ProcessorGraphNode<>("stateless", null);
        statefulParent.addChild(node);

        final long extracted = GraphGraceSearchUtil.findAndVerifyWindowGrace(node);
        assertThat(extracted, is(windows.gracePeriodMs() + windows.inactivityGap()));
    }