FutureCacheWrapper implements FutureCache<K, V> { public static <K, V> Builder<K, V> newBuilder(Class<K> keyType, Class<V> valueType) { return new Builder<K, V>().setKeyType(keyType).setValueType(valueType); } private  FutureCacheWrapper(Builder<K, V> config); @Override Future<V> get(K key); @Override Future<V> put(K key, V value, long expiry, TimeUnit unit); @Override Future<K> remove(K key); @Override Future<Map<K, V>> getAll(Collection<K> keys); @Override Future<Map<K, V>> putAll(Map<K, V> map, long expiry, TimeUnit unit); @Override Future<Collection<K>> removeAll(Collection<K> keys); static Builder<K, V> newBuilder(Class<K> keyType, Class<V> valueType);  }
@Test(expected = IllegalArgumentException.class) public void testNullKeyType() { FutureCacheWrapper.newBuilder(null, String.class) .setDelegate((RxCache<Object, String>) mock(RxCache.class)) .build(); }
@Test(expected = IllegalArgumentException.class) public void testNullValueType() { FutureCacheWrapper.newBuilder(String.class, null) .setDelegate((RxCache<String, Object>) mock(RxCache.class)) .build(); }
@Test(expected = IllegalArgumentException.class) public void testNullDelegate() { FutureCacheWrapper.newBuilder(String.class, String.class).build(); }
@Test(expected = IllegalArgumentException.class) public void testNullDelegate2() { FutureCacheWrapper.newBuilder(String.class, String.class).setDelegate(null).build(); }