### Question:
ResultSetUtil { @SuppressWarnings({ "rawtypes", "unchecked" }) public static int compareTo(final Comparable thisValue, final Comparable otherValue, final OrderType orderType, final OrderType nullOrderType) { if (null == thisValue && null == otherValue) { return 0; } if (null == thisValue) { return orderType == nullOrderType ? -1 : 1; } if (null == otherValue) { return orderType == nullOrderType ? 1 : -1; } return OrderType.ASC == orderType ? thisValue.compareTo(otherValue) : -thisValue.compareTo(otherValue); }  static Object convertValue(final Object value, final Class<?> convertType); @SuppressWarnings({ "rawtypes", "unchecked" }) static int compareTo(final Comparable thisValue, final Comparable otherValue, final OrderType orderType, final OrderType nullOrderType);  }### Answer:
@Test public void assertCompareToWhenBothNull() { assertThat(ResultSetUtil.compareTo(null, null, OrderType.DESC, OrderType.ASC), is(0)); }
@Test public void assertCompareToWhenFirstValueIsNullForOrderByAscAndNullOrderByAsc() { assertThat(ResultSetUtil.compareTo(null, 1, OrderType.ASC, OrderType.ASC), is(-1)); }
@Test public void assertCompareToWhenFirstValueIsNullForOrderByAscAndNullOrderByDesc() { assertThat(ResultSetUtil.compareTo(null, 1, OrderType.ASC, OrderType.DESC), is(1)); }
@Test public void assertCompareToWhenFirstValueIsNullForOrderByDescAndNullOrderByAsc() { assertThat(ResultSetUtil.compareTo(null, 1, OrderType.DESC, OrderType.ASC), is(1)); }
@Test public void assertCompareToWhenFirstValueIsNullForOrderByDescAndNullOrderByDesc() { assertThat(ResultSetUtil.compareTo(null, 1, OrderType.DESC, OrderType.DESC), is(-1)); }
@Test public void assertCompareToWhenSecondValueIsNullForOrderByAscAndNullOrderByAsc() { assertThat(ResultSetUtil.compareTo(1, null, OrderType.ASC, OrderType.ASC), is(1)); }
@Test public void assertCompareToWhenSecondValueIsNullForOrderByAscAndNullOrderByDesc() { assertThat(ResultSetUtil.compareTo(1, null, OrderType.ASC, OrderType.DESC), is(-1)); }
@Test public void assertCompareToWhenSecondValueIsNullForOrderByDescAndNullOrderByAsc() { assertThat(ResultSetUtil.compareTo(1, null, OrderType.DESC, OrderType.ASC), is(-1)); }
@Test public void assertCompareToWhenSecondValueIsNullForOrderByDescAndNullOrderByDesc() { assertThat(ResultSetUtil.compareTo(1, null, OrderType.DESC, OrderType.DESC), is(1)); }
@Test public void assertCompareToWhenAsc() { assertThat(ResultSetUtil.compareTo(1, 2, OrderType.ASC, OrderType.ASC), is(-1)); }
@Test public void assertCompareToWhenDesc() { assertThat(ResultSetUtil.compareTo(1, 2, OrderType.DESC, OrderType.ASC), is(1)); }