EVCacheImpl extends AbstractValueAdaptingCache implements EVCache { @Override public void evict(final Object key) { doDelete(toEVCacheKey(key)); } EVCacheImpl(final String name,
                       final com.netflix.evcache.EVCache cache,
                       final boolean allowNullValues,
                       final int striped,
                       final boolean deleteWhitespaceKey); @Override String getName(); @Override com.netflix.evcache.EVCache getNativeCache(); @SuppressWarnings("unchecked") @Override T get(final Object key, final Callable<T> valueLoader); @Override void put(final Object key, final Object value); @Override ValueWrapper putIfAbsent(final Object key, final Object value); @Override void evict(final Object key); @Override void clear();  }
@Test void should_be_delete_when_evict() throws EVCacheException { cache.evict(1); verify(source).delete("1"); }
@Test void should_be_throw_EVCacheInvalidKeyException_when_evict_key_is_null() { assertThatThrownBy(() -> cache.evict(null)).isExactlyInstanceOf(EVCacheInvalidKeyException.class); }
@Test void should_be_throw_EVCacheEvictException_when_evict_throw_EVCacheException() throws EVCacheException { doThrow(EVCacheException.class).when(source).delete("1"); assertThatThrownBy(() -> cache.evict("1")).isExactlyInstanceOf(EVCacheEvictException.class); }