@Test
public void testInvalidate() {

    Cache.Entry entry = randomData(32);
    entry.softTtl = 8765432L;
    entry.ttl = 9876543L;
    cache.put("key", entry);
    cache.invalidate("key", false);
    entry.softTtl = 0; // expired
    assertThatEntriesAreEqual(cache.get("key"), entry);
}