@Test
public void testCompareUnequalWritables() throws Exception {

  DataOutputBuffer bTrue = writeWritable(new BooleanWritable(true));
  DataOutputBuffer bFalse = writeWritable(new BooleanWritable(false));
  WritableComparator writableComparator =
    WritableComparator.get(BooleanWritable.class);
  assertEquals(0, compare(writableComparator, bTrue, bTrue));
  assertEquals(0, compare(writableComparator, bFalse, bFalse));
  assertEquals(1, compare(writableComparator, bTrue, bFalse));
  assertEquals(-1, compare(writableComparator, bFalse, bTrue));
}