@Test
  public void comparingComparableValuesShouldThrowExceptionWhenTheComparisonOperatorIsNotSupported() {
    OQLLexerTokenTypes tempInstance = new OQLLexerTokenTypes() {};
    Field[] fields = OQLLexerTokenTypes.class.getDeclaredFields();

    Arrays.stream(fields).forEach(field -> {
      try {
        int token = field.getInt(tempInstance);
        if (!comparisonOperators.contains(token)) {
          assertThatThrownBy(
              () -> TypeUtils.compare(mock(Comparable.class), mock(Comparable.class), token))
                  .isInstanceOf(IllegalArgumentException.class)
                  .hasMessageMatching("^Unknown operator: (.*)$");
        }
      } catch (Exception exception) {
        throw new RuntimeException(exception);
      }
    });
  }
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