@Test
  public void comparingTemporalValuesIsEnabled() {
    // Spies to make sure that other comparison methods are not executed.
    Date beginningOfTimeAsDate = spy(new Date(0L));
    Date currentCalendarTimeAsDate = spy(Calendar.getInstance().getTime());
    java.sql.Date beginningOfTimeAsSqlDate =
        spy(new java.sql.Date(beginningOfTimeAsDate.getTime()));
    java.sql.Date currentCalendarTimeAsSqlDate =
        spy(new java.sql.Date(currentCalendarTimeAsDate.getTime()));
    java.sql.Time beginningOfTimeAsSqlTime =
        spy(new java.sql.Time(beginningOfTimeAsDate.getTime()));
    java.sql.Time currentCalendarTimeAsSqlTime =
        spy(new java.sql.Time(currentCalendarTimeAsDate.getTime()));
    java.sql.Timestamp beginningOfTimeAsSqlTimestamp =
        spy(new java.sql.Timestamp(beginningOfTimeAsDate.getTime()));
    java.sql.Timestamp currentCalendarTimeAsSqlTimestamp =
        spy(new java.sql.Timestamp(currentCalendarTimeAsDate.getTime()));

    List<Object> originDates = Arrays.asList(new Object[] {beginningOfTimeAsDate,
        beginningOfTimeAsSqlDate, beginningOfTimeAsSqlTime, beginningOfTimeAsSqlTimestamp});
    List<Object> currentDates =
        Arrays.asList(new Object[] {currentCalendarTimeAsDate, currentCalendarTimeAsSqlDate,
            currentCalendarTimeAsSqlTime, currentCalendarTimeAsSqlTimestamp});

    originDates.forEach(originDate -> originDates.forEach(originDate2 -> {
      try {
        assertThat(TypeUtils.compare(originDate, originDate2, OQLLexerTokenTypes.TOK_EQ))
            .isEqualTo(Boolean.TRUE);
        assertThat(TypeUtils.compare(originDate, originDate2, OQLLexerTokenTypes.TOK_LT))
            .isEqualTo(Boolean.FALSE);
        assertThat(TypeUtils.compare(originDate, originDate2, OQLLexerTokenTypes.TOK_LE))
            .isEqualTo(Boolean.TRUE);
        assertThat(TypeUtils.compare(originDate, originDate2, OQLLexerTokenTypes.TOK_GT))
            .isEqualTo(Boolean.FALSE);
        assertThat(TypeUtils.compare(originDate, originDate2, OQLLexerTokenTypes.TOK_GE))
            .isEqualTo(Boolean.TRUE);
        assertThat(TypeUtils.compare(originDate, originDate2, OQLLexerTokenTypes.TOK_NE))
            .isEqualTo(Boolean.FALSE);
      } catch (TypeMismatchException typeMismatchException) {
        throw new RuntimeException(typeMismatchException);
      }
    }));

    originDates.forEach(originDate -> currentDates.forEach(currentTime -> {
      try {
        assertThat(TypeUtils.compare(originDate, currentTime, OQLLexerTokenTypes.TOK_EQ))
            .isEqualTo(Boolean.FALSE);
        assertThat(TypeUtils.compare(originDate, currentTime, OQLLexerTokenTypes.TOK_LT))
            .isEqualTo(Boolean.TRUE);
        assertThat(TypeUtils.compare(originDate, currentTime, OQLLexerTokenTypes.TOK_LE))
            .isEqualTo(Boolean.TRUE);
        assertThat(TypeUtils.compare(originDate, currentTime, OQLLexerTokenTypes.TOK_GT))
            .isEqualTo(Boolean.FALSE);
        assertThat(TypeUtils.compare(originDate, currentTime, OQLLexerTokenTypes.TOK_GE))
            .isEqualTo(Boolean.FALSE);
        assertThat(TypeUtils.compare(originDate, currentTime, OQLLexerTokenTypes.TOK_NE))
            .isEqualTo(Boolean.TRUE);
      } catch (TypeMismatchException typeMismatchException) {
        throw new RuntimeException(typeMismatchException);
      }
    }));

    currentDates.forEach(currentTime -> originDates.forEach(originDate -> {
      try {
        assertThat(TypeUtils.compare(currentTime, originDate, OQLLexerTokenTypes.TOK_EQ))
            .isEqualTo(Boolean.FALSE);
        assertThat(TypeUtils.compare(currentTime, originDate, OQLLexerTokenTypes.TOK_LT))
            .isEqualTo(Boolean.FALSE);
        assertThat(TypeUtils.compare(currentTime, originDate, OQLLexerTokenTypes.TOK_LE))
            .isEqualTo(Boolean.FALSE);
        assertThat(TypeUtils.compare(currentTime, originDate, OQLLexerTokenTypes.TOK_GT))
            .isEqualTo(Boolean.TRUE);
        assertThat(TypeUtils.compare(currentTime, originDate, OQLLexerTokenTypes.TOK_GE))
            .isEqualTo(Boolean.TRUE);
        assertThat(TypeUtils.compare(currentTime, originDate, OQLLexerTokenTypes.TOK_NE))
            .isEqualTo(Boolean.TRUE);
      } catch (TypeMismatchException typeMismatchException) {
        throw new RuntimeException(typeMismatchException);
      }
    }));
  }
Can't test every possible combination so try the known, relevant ones.
geode-core/src/test/java/org/apache/geode/cache/query/internal/types/TypeUtilsJUnitTest.java