For this method, you can implement it as

    return Value.Sorter.INSTANCE.compare(Value.wrap(Convert.javaToThrift(a)), Value.wrap(Convert.javaToThrift(b)));

This has the advantage of ensuring that this utility is always in sign with any changes we make to the Value comparator