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

    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(extractor.getValue("one")).andReturn(1);
    expect(extractor.getValue("two")).andReturn(2);
    replay(extractor, keys);
    assertTrue(map.containsValue(2));
    verify(extractor, keys);
}