@Test
public void testSanity()
{

    AtomicInteger count = new AtomicInteger(0);
    ThreadLocalCache<String, String> cache = new ThreadLocalCache<>(2, key -> {
        // Concatenate key with counter
        return key + count.getAndAdd(1);
    });
    // Load first key
    assertEquals(cache.get("abc"), "abc0");
    assertEquals(cache.get("abc"), "abc0");
    // Load second key
    assertEquals(cache.get("def"), "def1");
    // First key should still be there
    assertEquals(cache.get("abc"), "abc0");
    // Expire first key by exceeding max size
    assertEquals(cache.get("ghi"), "ghi2");
    // First key should now be regenerated
    assertEquals(cache.get("abc"), "abc3");
    // TODO: add tests for multiple threads
}