public void put(K key, V value) {
        if (value == null) {
            throw new IllegalArgumentException("Null values are disallowed");
        }

        ValueAndTimestamp<V> oldValue = cache.put(key, new ValueAndTimestamp<>(value));
        if (oldValue == null && cache.size() > cleanupThreshold) {
            doCleanup();
        }
    }
@Test
    public void test_cleanup() {
        assertEntries(entry(1, 1), entry(2, 2), entry(3, 3));

        put(4, 4);
        assertEntries(entry(3, 3), entry(4, 4));
    }