### Question:
KeyValueGetRangeQuery implements LocalStoreQuery<K, V> { @Override public Try<List<KV<K, V>>> execute(final KafkaStreamsContainer container, final long limit) { final LocalStoreAccessor<ReadOnlyKeyValueStore<K, V>> accessor = container.localKeyValueStore(store); final Reader<ReadOnlyKeyValueStore<K, V>, List<KV<K, V>>> reader = reader(keyFrom, keyTo).map(iterator -> LocalStoreQuery.toKeyValueListAndClose(iterator, limit)); return new LocalStoreQueryExecutor<>(accessor).execute(reader); } KeyValueGetRangeQuery(final String store, final K keyFrom, final K keyTo); @Override StoreType storeType(); @Override StoreOperation operationType(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override Try<List<KV<K, V>>> execute(final KafkaStreamsContainer container, final long limit);  }### Answer:
@Test public void shouldGetGivenRange() { KeyValueGetRangeQuery<String, String> query = new KeyValueGetRangeQuery<>(STORE_NAME, "keyFrom", "keyTo"); final var mkContainer = Mockito.mock(KafkaStreamsContainer.class); ReadOnlyKeyValueStore store = mock(ReadOnlyKeyValueStore.class); when(store.range("keyFrom", "keyTo")).thenReturn(new InMemoryKeyValueIterator<>("keyFrom", "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("keyFrom", "value"), result.get().get(0)); }