@Override
    public long approximateNumEntries() {
        final List<ReadOnlyKeyValueStore<K, V>> stores = storeProvider.stores(storeName, storeType);
        long total = 0;
        for (final ReadOnlyKeyValueStore<K, V> store : stores) {
            total += store.approximateNumEntries();
            if (total < 0) {
                return Long.MAX_VALUE;
            }
        }
        return total;
    }
@Test
    public void shouldGetApproximateEntriesAcrossAllStores() {
        final KeyValueStore<String, String> cache = newStoreInstance();
        stubProviderTwo.addStore(storeName, cache);

        stubOneUnderlying.put("a", "a");
        stubOneUnderlying.put("b", "b");
        stubOneUnderlying.put("z", "z");

        cache.put("c", "c");
        cache.put("d", "d");
        cache.put("x", "x");

        assertEquals(6, theStore.approximateNumEntries());
    }