@Override
        public void init(final ProcessorContext<String, Long> context) {
            this.context = context;
            context.schedule(Duration.ofSeconds(60), PunctuationType.WALL_CLOCK_TIME, this::flushStore);
            context.schedule(Duration.ofSeconds(10), PunctuationType.STREAM_TIME, this::flushStore);
            store = context.getStateStore("aggStore");
        }
This is code sample in docs/streams/developer-guide/testing.html
streams/examples/src/test/java/org/apache/kafka/streams/examples/docs/DeveloperGuideTesting.java