### Question:
BooleanWritable implements WritableComparable<BooleanWritable> { public boolean get() { return value; } BooleanWritable();  BooleanWritable(boolean value); void set(boolean value); boolean get(); void readFields(DataInput in); void write(DataOutput out); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(BooleanWritable o); @Override String toString();  }### Answer:
@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)); }