EVCacheImpl extends AbstractValueAdaptingCache implements EVCache { @Override public void put(final Object key, final Object value) { doSet(toEVCacheKey(key), value); } 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_set_when_put() throws EVCacheException { cache.put(1, 2); verify(source).set("1", 2); }
@Test void should_be_throw_EVCachePutException_when_get_throw_EVCacheException() throws EVCacheException { doThrow(EVCacheException.class).when(source).set("1", "1"); assertThatThrownBy(() -> cache.put("1", "1")).isExactlyInstanceOf(EVCachePutException.class); }
@Test void should_be_thrown_EVCacheInvalidKeyException_when_put_key_is_null() { assertThatThrownBy(() -> cache.put(null, null)).isExactlyInstanceOf(EVCacheInvalidKeyException.class); }