private <KIn, VIn, KOut, VOut> ProcessorSupplier<KIn, VIn, KOut, VOut> defineWithStores(final Supplier<Processor<KIn, VIn, KOut, VOut>> supplier,
                                                                                            final Set<StoreBuilder<?>> stores) {
        return new ProcessorSupplier<KIn, VIn, KOut, VOut>() {
            @Override
            public Processor<KIn, VIn, KOut, VOut> get() {
                return supplier.get();
            }

            @Override
            public Set<StoreBuilder<?>> stores() {
                return stores;
            }
        };
    }
A processor that stores each key-value pair in an in-memory key-value store registered with the context.
streams/src/test/java/org/apache/kafka/streams/processor/internals/ProcessorTopologyTest.java