@SuppressWarnings("unchecked")
    public <K, V> KeyValueStore<K, V> getKeyValueStore(final String name) {
        final StateStore store = getStateStore(name, false);
        if (store instanceof TimestampedKeyValueStore) {
            log.info("Method #getTimestampedKeyValueStore() should be used to access a TimestampedKeyValueStore.");
            return new KeyValueStoreFacade<>((TimestampedKeyValueStore<K, V>) store);
        }
        return store instanceof KeyValueStore ? (KeyValueStore<K, V>) store : null;
    }
Get the {@link KeyValueStore} or {@link TimestampedKeyValueStore} with the given name.
The store can be a "regular" or global store.
<p>
If the registered store is a {@link TimestampedKeyValueStore} this method will return a value-only query
interface. <strong>It is highly recommended to update the code for this case to avoid bugs and to use
{@link #getTimestampedKeyValueStore(String)} for full store access instead.</strong>
<p>
This is often useful in test cases to pre-populate the store before the test case instructs the topology to
{@link TestInputTopic#pipeInput(TestRecord) process an input message}, and/or to check the store afterward.

@param name the name of the store
@return the key value store, or {@code null} if no {@link KeyValueStore} or {@link TimestampedKeyValueStore}
has been registered with the given name
@see #getAllStateStores()
@see #getStateStore(String)
@see #getTimestampedKeyValueStore(String)
@see #getVersionedKeyValueStore(String)
@see #getWindowStore(String)
@see #getTimestampedWindowStore(String)
@see #getSessionStore(String)
streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java