@Override
    public WindowStoreIterator<V> backwardFetch(final K key,
                                                final Instant timeFrom,
                                                final Instant timeTo) throws IllegalArgumentException {
        Objects.requireNonNull(key, "key can't be null");
        final List<ReadOnlyWindowStore<K, V>> stores = provider.stores(storeName, windowStoreType);
        for (final ReadOnlyWindowStore<K, V> windowStore : stores) {
            try {
                final WindowStoreIterator<V> result = windowStore.backwardFetch(key, timeFrom, timeTo);
                if (!result.hasNext()) {
                    result.close();
                } else {
                    return result;
                }
            } catch (final InvalidStateStoreException e) {
                throw new InvalidStateStoreException(
                    "State store is not available anymore and may have been migrated to another instance; " +
                        "please re-discover its location from the state metadata.");
            }
        }
        return KeyValueIterators.emptyWindowStoreIterator();
    }
@Test
    public void emptyBackwardIteratorNextShouldThrowNoSuchElementException() {
        final StateStoreProvider storeProvider = mock(StateStoreProvider.class);
        when(storeProvider.stores(anyString(), any())).thenReturn(emptyList());

        final CompositeReadOnlyWindowStore<Object, Object> store = new CompositeReadOnlyWindowStore<>(
            storeProvider,
            QueryableStoreTypes.windowStore(),
            "foo"
        );
        try (final WindowStoreIterator<Object> windowStoreIterator =
                 store.backwardFetch("key", ofEpochMilli(1), ofEpochMilli(10))) {
            assertThrows(NoSuchElementException.class, windowStoreIterator::next);
        }
    }