public ValueAndTimestamp<V> get(final K key) {
        if (timestampedStore != null) {
            return timestampedStore.get(key);
        }
        if (versionedStore != null) {
            final VersionedRecord<V> versionedRecord = versionedStore.get(key);
            return versionedRecord == null
                ? null
                : ValueAndTimestamp.make(versionedRecord.value(), versionedRecord.timestamp());
        }
        throw new IllegalStateException("KeyValueStoreWrapper must be initialized with either timestamped or versioned store");
    }
@Test
    public void shouldGetFromVersionedStore() {
        givenWrapperWithVersionedStore();
        when(versionedStore.get(KEY)).thenReturn(
            new VersionedRecord<>(
                VALUE_AND_TIMESTAMP.value(),
                VALUE_AND_TIMESTAMP.timestamp())
        );

        assertThat(wrapper.get(KEY), equalTo(VALUE_AND_TIMESTAMP));
    }