@Test
public void remove() {

    Map<String, String> map = new ExpiringMap<>(executor);
    map.put("key1", "value1");
    map.put("key2", "value2");
    String val = map.remove("key2");
    assertEquals("value2", val);
    assertEquals(1, map.size());
    assertTrue(map.containsKey("key1"));
}