SyncCacheWrapper implements SyncCache<K, V> { @Override public Collection<K> removeAll(Collection<K> keys) { return blocking(config.delegate.removeAll(keys)); } private  SyncCacheWrapper(Builder<K, V> config); @Override V get(K key); @Override V put(K key, V value, long expiry, TimeUnit unit); @Override K remove(K key); @Override Map<K, V> getAll(Collection<K> keys); @Override Map<K, V> putAll(Map<K, V> map, long expiry, TimeUnit unit); @Override Collection<K> removeAll(Collection<K> keys); static Builder<K, V> newBuilder(Class<K> keyType, Class<V> valueType);  }
@Test public void testRemoveAll() throws ExecutionException, InterruptedException { final Collection<String> keys = new ArrayList<>(); keys.add("foo"); keys.add("bar"); keys.add("baz"); when(delegate.removeAll(keys)).thenReturn(immediate(keys)); final Collection<String> result = wrapper.removeAll(keys); assertThat(result).isEqualTo(keys); }