@SuppressWarnings("unchecked")
@Test
public void testClear() {

    Enumeration<String> keys = createMock(Enumeration.class);
    expect(extractor.getKeys()).andReturn(keys);
    expect(keys.hasMoreElements()).andReturn(true);
    expect(keys.nextElement()).andReturn("one");
    expect(keys.hasMoreElements()).andReturn(true);
    expect(keys.nextElement()).andReturn("two");
    expect(keys.hasMoreElements()).andReturn(false);
    extractor.removeValue("one");
    extractor.removeValue("two");
    replay(extractor, keys);
    map.clear();
    verify(extractor, keys);
}