### Question:
WrappingStoreProvider implements StateStoreProvider { public <T> List<T> stores(final String storeName, QueryableStoreType<T> type) { final List<T> allStores = new ArrayList<>(); for (StateStoreProvider provider : storeProviders) { final List<T> stores = provider.stores(storeName, type); allStores.addAll(stores); } if (allStores.isEmpty()) { throw new InvalidStateStoreException("the state store, " + storeName + ", may have migrated to another instance."); } return allStores; } WrappingStoreProvider(final List<StateStoreProvider> storeProviders); List<T> stores(final String storeName, QueryableStoreType<T> type);  }### Answer:
@Test public void shouldFindKeyValueStores() throws Exception { List<ReadOnlyKeyValueStore<String, String>> results = wrappingStoreProvider.stores("kv", QueryableStoreTypes.<String, String>keyValueStore()); assertEquals(2, results.size()); }
@Test public void shouldFindWindowStores() throws Exception { final List<ReadOnlyWindowStore<Object, Object>> windowStores = wrappingStoreProvider.stores("window", windowStore()); assertEquals(2, windowStores.size()); }
@Test(expected = InvalidStateStoreException.class) public void shouldThrowInvalidStoreExceptionIfNoStoreOfTypeFound() throws Exception { wrappingStoreProvider.stores("doesn't exist", QueryableStoreTypes.keyValueStore()); }