@Override
    public V put(final K key, final V value) {
        checkAndScheduleRefresh(this);
        final V previous = cache.getIfPresent(key);
        cache.put(key, value);
        return previous;
    }
@Test
    public void testWindowTinyLFUOutOufMemoryException() {
        final int mb = 1024 * 1024;
        for (int i = 0; i < 1000; i++) {
            MemorySafeWindowTinyLFUMap<String, Byte[]> instance = new MemorySafeWindowTinyLFUMap<>(1, 1024);
            instance.put(String.valueOf(1), new Byte[mb]);
        }
        Set<WeakReference<MemorySafeWindowTinyLFUMap<?, ?>>> all =
                (Set<WeakReference<MemorySafeWindowTinyLFUMap<?, ?>>>) ReflectUtils.getFieldValue(new MemorySafeWindowTinyLFUMap(1, 1024), "ALL");
        Assert.assertNotEquals(1000, all.size());
    }