static <K, V> StateSerdes<K, V> prepareStoreSerde(final StateStoreContext context,
                                                      final String storeName,
                                                      final String changelogTopic,
                                                      final Serde<K> keySerde,
                                                      final Serde<V> valueSerde,
                                                      final PrepareFunc<V> prepareValueSerdeFunc) {
        return new StateSerdes<>(
            changelogTopic,
            prepareSerde(WrappingNullableUtils::prepareKeySerde, storeName, keySerde, new SerdeGetter(context), true, context.taskId()),
            prepareSerde(prepareValueSerdeFunc, storeName, valueSerde, new SerdeGetter(context), false, context.taskId())
        );
    }
@Test
    public void shouldPrepareStoreSerdeForProcessorContext() {
        final Serde<String> keySerde = new Serdes.StringSerde();
        final Serde<String> valueSerde = new Serdes.StringSerde();

        final MockInternalNewProcessorContext<String, String> context = new MockInternalNewProcessorContext<>();

        utilsMock.when(() -> WrappingNullableUtils.prepareKeySerde(any(), any())).thenReturn(keySerde);
        utilsMock.when(() -> WrappingNullableUtils.prepareValueSerde(any(), any())).thenReturn(valueSerde);

        final StateSerdes<String, String> result = StoreSerdeInitializer.prepareStoreSerde(
            (ProcessorContext) context, "myStore", "topic", keySerde, valueSerde, WrappingNullableUtils::prepareValueSerde);

        assertThat(result.keySerde(), equalTo(keySerde));
        assertThat(result.valueSerde(), equalTo(valueSerde));
        assertThat(result.topic(), equalTo("topic"));
    }