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

    HasKeys<Integer> otherRequest = createMock(HasKeys.class);
    ReadOnlyEnumerationMap<Integer> otherMap = createMockBuilder(
            ReadOnlyEnumerationMap.class).withConstructor(otherRequest)
            .createMock();
    Enumeration<String> keys = createMock(Enumeration.class);
    Enumeration<String> otherKeys = createMock(Enumeration.class);
    expect(extractor.getKeys()).andReturn(keys);
    expect(otherRequest.getKeys()).andReturn(otherKeys);
    expect(keys.hasMoreElements()).andReturn(true);
    expect(keys.nextElement()).andReturn("first");
    expect(keys.hasMoreElements()).andReturn(true);
    expect(keys.nextElement()).andReturn("second");
    expect(keys.hasMoreElements()).andReturn(false);
    expect(extractor.getValue("first")).andReturn(1);
    expect(extractor.getValue("second")).andReturn(2);
    expect(otherKeys.hasMoreElements()).andReturn(true);
    expect(otherKeys.nextElement()).andReturn("first");
    expect(otherKeys.hasMoreElements()).andReturn(true);
    expect(otherKeys.nextElement()).andReturn("second");
    expect(otherKeys.hasMoreElements()).andReturn(false);
    expect(otherRequest.getValue("first")).andReturn(1);
    expect(otherRequest.getValue("second")).andReturn(3);
    replay(extractor, otherRequest, otherMap, keys, otherKeys);
    assertFalse(map.equals(otherMap));
    verify(extractor, otherRequest, otherMap, keys, otherKeys);
}