@Test
@SuppressWarnings("UnnecessaryBoxing")
public void equality() {

    Integer[] integers1 = new Integer[]{Integer.valueOf(1), Integer.valueOf(2)};
    Integer[] integers2 = new Integer[]{Integer.valueOf(1), Integer.valueOf(2), new Integer(3)};
    int[] ints1 = {1, 2};
    int[] ints2 = {1, 2, 3};
    List<Integer> lintegers = asList(Integer.valueOf(1), Integer.valueOf(2));
    assertTrue(TypeUtils.equals(integers1, integers1));
    assertTrue(TypeUtils.equals(ints1, ints1));
    assertFalse(TypeUtils.equals(integers1, ints2));
    assertFalse(TypeUtils.equals(ints1, integers2));
    assertTrue(TypeUtils.equals(integers1, lintegers));
    assertTrue(TypeUtils.equals(lintegers, integers1));
    assertTrue(TypeUtils.equals(ints1, lintegers));
    assertTrue(TypeUtils.equals(lintegers, ints1));
    // force equals(Object, Object)
    assertTrue(TypeUtils.equals((Object) integers1, (Object) integers1));
    assertTrue(TypeUtils.equals((Object) ints1, (Object) ints1));
    assertFalse(TypeUtils.equals((Object) integers1, (Object) ints2));
    assertFalse(TypeUtils.equals((Object) ints1, (Object) integers2));
    assertTrue(TypeUtils.equals((Object) integers1, (Object) lintegers));
    assertTrue(TypeUtils.equals((Object) lintegers, (Object) integers1));
    assertTrue(TypeUtils.equals((Object) ints1, (Object) lintegers));
    assertTrue(TypeUtils.equals((Object) lintegers, (Object) ints1));
}