@Test
public void testKeySet() {

    Set<String> keys = map.keySet();
    map.put("k", newArrayList("a", "b"));
    map.put("e", newArrayList("c", "d"));
    map.put("Y", newArrayList("e", "f"));
    assertEquals(3, map.size());
    assertEquals(3, keys.size());
    assertTrue(keys.contains("K"));
    assertTrue(keys.contains("Y"));
    assertTrue(keys.contains("e"));
    assertTrue(keys.remove("Y"));
    assertEquals(2, map.size());
    assertEquals(2, keys.size());
    assertTrue(keys.contains("K"));
    assertTrue(keys.contains("e"));
    assertFalse(keys.contains("Y"));
    for (Iterator<String> iterator = keys.iterator(); iterator.hasNext(); ) {
        iterator.next();
        iterator.remove();
    }
    assertEquals(0, map.size());
    assertEquals(0, keys.size());
}