@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 shouldThrowInvalidStoreExceptionOnApproximateNumEntriesDuringRebalance() {
        assertThrows(InvalidStateStoreException.class, () -> rebalancing().approximateNumEntries());
    }