@Test void testShouldThrowIllegalArgumentExceptionWhenKeyIsNullOnContainsKey() { assertThrows(IllegalArgumentException.class, () -> testSubject.containsKey(null)); }
@Override public boolean containsKey(Object key) { Assert.nonNull(key, () -> "Key may not be null"); purgeItems(); final Reference<Object> entry = cache.get(key); return entry != null && entry.get() != null; }
WeakReferenceCache implements Cache { @Override public boolean containsKey(Object key) { Assert.nonNull(key, () -> "Key may not be null"); purgeItems(); final Reference<Object> entry = cache.get(key); return entry != null && entry.get() != null; } }
WeakReferenceCache implements Cache { @Override public boolean containsKey(Object key) { Assert.nonNull(key, () -> "Key may not be null"); purgeItems(); final Reference<Object> entry = cache.get(key); return entry != null && entry.get() != null; }  }
WeakReferenceCache implements Cache { @Override public boolean containsKey(Object key) { Assert.nonNull(key, () -> "Key may not be null"); purgeItems(); final Reference<Object> entry = cache.get(key); return entry != null && entry.get() != null; }  @Override Registration registerCacheEntryListener(EntryListener entryListener); @Override @SuppressWarnings("unchecked") V get(K key); @Override void put(Object key, Object value); @Override boolean putIfAbsent(Object key, Object value); @Override boolean remove(Object key); @Override boolean containsKey(Object key); }
WeakReferenceCache implements Cache { @Override public boolean containsKey(Object key) { Assert.nonNull(key, () -> "Key may not be null"); purgeItems(); final Reference<Object> entry = cache.get(key); return entry != null && entry.get() != null; }  @Override Registration registerCacheEntryListener(EntryListener entryListener); @Override @SuppressWarnings("unchecked") V get(K key); @Override void put(Object key, Object value); @Override boolean putIfAbsent(Object key, Object value); @Override boolean remove(Object key); @Override boolean containsKey(Object key);  }