@Override
    public VersionedKeyValueStore<K, V> build() {
        final KeyValueStore<Bytes, byte[]> store = storeSupplier.get();
        if (!(store instanceof VersionedBytesStore)) {
            throw new IllegalStateException("VersionedBytesStoreSupplier.get() must return an instance of VersionedBytesStore");
        }

        return new MeteredVersionedKeyValueStore<>(
            maybeWrapLogging((VersionedBytesStore) store), // no caching layer for versioned stores
            storeSupplier.metricsScope(),
            time,
            keySerde,
            valueSerde);
    }
@Test
    public void shouldHaveChangeLoggingStoreByDefault() {
        setUp();
        final VersionedKeyValueStore<String, String> store = builder.build();

        assertThat(store, instanceOf(MeteredVersionedKeyValueStore.class));
        final StateStore next = ((WrappedStateStore) store).wrapped();
        assertThat(next, instanceOf(ChangeLoggingVersionedKeyValueBytesStore.class));
    }