public void testCompareObjects() throws IOException {
// Testing behaviour of the method with non Object types.
// Object behaviour not tested here.
SortComparator sortComparator = new SortComparator();
MyThriftComparator thriftComp = new MyThriftComparator(getConf());
assertEquals(1, sortComparator.compareObjects(new A("1", null), new A("2", null), thriftComp, Type.OBJECT, null));
assertEquals(0, sortComparator.compareObjects(new A("2", null), new A("2", null), thriftComp, Type.OBJECT, null));
assertEquals(-1, sortComparator.compareObjects(new A("3", null), new A("2", null), thriftComp, Type.OBJECT, null));
assertEquals(1, sortComparator.compareObjects(new A("1", null), new A("2", null), thriftComp, Type.OBJECT, null));
assertEquals(0, sortComparator.compareObjects(new A("2", null), new A("2", null), thriftComp, Type.OBJECT, null));
assertEquals(-1, sortComparator.compareObjects(new A("3", null), new A("2", null), thriftComp, Type.OBJECT, null));
}