### Question:
KeyValueGetQuery extends KeyedLocalStoreQuery<K, K, V> { @Override public Try<List<KV<K, V>>> execute(final KafkaStreamsContainer container, final long limit) { final LocalStoreAccessor<ReadOnlyKeyValueStore<K, V>> accessor = container.localKeyValueStore(storeName()); final Reader<ReadOnlyKeyValueStore<K, V>, List<KV<K, V>>> reader = reader(key()).map(value -> Optional.ofNullable(value) .map(v -> Collections.singletonList(new KV<>(key(), v))) .orElse(Collections.emptyList())); return new LocalStoreQueryExecutor<>(accessor).execute(reader); } KeyValueGetQuery(final String storeName,
                     final K key,
                     final Serializer<K> keySerializer); @Override StoreType storeType(); @Override StoreOperation operationType(); @Override Try<List<KV<K, V>>> execute(final KafkaStreamsContainer container, final long limit);  }### Answer:
@Test public void shouldGetGivenKey() { KeyValueGetQuery<String, String> query = new KeyValueGetQuery<>(STORE_NAME, "key", Serdes.String().serializer()); final var mkContainer = Mockito.mock(KafkaStreamsContainer.class); ReadOnlyKeyValueStore store = mock(ReadOnlyKeyValueStore.class); when(store.get("key")).thenReturn("value"); when(mkContainer.localKeyValueStore(matches(STORE_NAME))).thenReturn(new LocalStoreAccessor<>(() -> store)); Try<List<KV<String, String>>> result = query.execute(mkContainer); Assertions.assertEquals(1, result.get().size()); Assertions.assertEquals(KV.of("key", "value"), result.get().get(0)); }