public static int compare(Object o1, Object o2) {
        return o1.getClass() != o2.getClass() && o1 instanceof Number && o2 instanceof Number ?
                asBigDecimal((Number)o1).compareTo(asBigDecimal((Number)o2)) :
                ((Comparable) o1).compareTo(o2);
    }
@Test
    public void compareWithString() {
        assertThat(OperatorUtils.compare("ABC", "AAA")).isPositive();
        assertThat(OperatorUtils.compare("ABC", "ABC")).isZero();
        assertThat(OperatorUtils.compare("ABC", "XYZ")).isNegative();
    }