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

    Map<String, String> m1 = CollectionUtils.<String, String>newMap("k1", "v1", "k2", "v2");
    Map<String, String> m2 = CollectionUtils.<String, String>newMap("k2", "v2", "k1", "v1");
    Map<String, String> m3 = CollectionUtils.<String, String>newMap("k1", "v1", "k3", "v3");
    Map<String, String> m4 = CollectionUtils.<String, String>newMap("k1", "v1");
    assertTrue(TypeUtils.equals((Map) null, (Map) null));
    assertFalse(TypeUtils.equals(m1, (Map) null));
    assertFalse(TypeUtils.equals((Map) null, m2));
    assertTrue(TypeUtils.equals(m1, m1));
    assertTrue(TypeUtils.equals(m1, m2));
    assertFalse(TypeUtils.equals(m1, m3));
    assertFalse(TypeUtils.equals(m1, m4));
    // force equals(Object, Object)
    assertTrue(TypeUtils.equals((Object) m1, (Object) m2));
    assertFalse(TypeUtils.equals((Object) m1, (Object) m3));
}