### Question:
IntegerUtil { public static int safeCompare(final Integer id, final Integer id2) { int ret = -1; if (id != null && id2 != null) { ret = id.compareTo(id2); } else if (id == null && id2 == null) { ret = 0; } else if (id != null) { ret = 1; } return ret; } private  IntegerUtil(); static boolean isNotZero(final Integer value); static boolean isZero(final Integer value); static boolean isNullOrZero(final Integer value); static boolean isSameValue(final Integer val1, final Integer val2); static boolean isNotSameValue(final Integer val1, final Integer val2); static Integer safeAdd(final Integer v1, final Integer v2); static int safeSignum(final Integer v); static int safeCompare(final Integer id, final Integer id2); static Integer assign(final Integer value, final Integer defaultValueIfNull); static boolean isNotZeroOrNegative(final Integer id);  }### Answer:
@Test public void testSafeCompare() { assertThat(safeCompare(null, null)).isEqualTo(0); assertThat(safeCompare(0, null)).isEqualTo(1); assertThat(safeCompare(null, 0)).isEqualTo(-1); assertThat(safeCompare(0, 0)).isEqualTo(0); assertThat(safeCompare(10, 10)).isEqualTo(0); assertThat(safeCompare(10, 11)).isEqualTo(-1); assertThat(safeCompare(12, 11)).isEqualTo(1); }