@Test
public void testFullKeysCompare() throws Exception {

  Comparator<? super CKeyValue> comparator = KeyComparator.INSTANCE;
  CKeyValue one = new CKeyValue(new byte[0], new byte[0], new byte[] { 2 });
  CKeyValue two = new CKeyValue(new byte[1], new byte[1], new byte[] { 1 });
  int compare = comparator.compare(one, two);
  assertTrue(compare < 0);
  one = new CKeyValue(new byte[] { 1 }, new byte[] { 1 }, new byte[] { 1 });
  two = new CKeyValue(new byte[] { 1, 2 }, new byte[] { 1, 2 },
      new byte[] { 1 });
  compare = comparator.compare(one, two);
  assertTrue(compare < 0);
  one = new CKeyValue(new byte[] { 1, 2 }, new byte[] { 2 }, new byte[] { 1 });
  two = new CKeyValue(new byte[] { 1, 2 }, new byte[1], new byte[] { 1 });
  compare = comparator.compare(one, two);
  assertTrue(compare > 0);
  compare = comparator.compare(two, two);
  assertEquals(0, compare);
}