@Test
public void testRetrieveSpecificColumns() throws Exception {

  // setup the table
  List<CKeyValue> values = new ArrayList<CKeyValue>();
  values.add(new CKeyValue(new byte[] { 1 }, new byte[] { 2 },
      new byte[] { 3 }, 0, new byte[] { 4 }));
  values.add(new CKeyValue(new byte[] { 2 }, new byte[] { 3 },
      new byte[] { 3 }, 1, new byte[] { 5 }));
  values.add(new CKeyValue(new byte[] { 3 }, new byte[] { 4 },
      new byte[] { 3 }, 2, new byte[] { 6 }));
  values.add(new CKeyValue(new byte[] { 4 }, new byte[] { 4 },
      new byte[] { 4 }, 3, new byte[] { 7 }));
  InMemoryTable t1 = new InMemoryTable();
  t1.put(new Put(values));
  // test for getting a subset of results
  SeekingCurrentIterator iter = new RetrieveColumns(new KeyOnlyFilter(t1,
      new CColumn(new byte[] { 2 }), new CColumn(new byte[] { 3 })), t1)
      .getResultIterator();
  assertTrue(iter.hasNext());
  assertCount(iter, 2, 2);
  // test for only getting results with matching columns
  iter = new RetrieveColumns(new KeyOnlyFilter(t1, new CColumn(
      new byte[] { 2 }), new CColumn(new byte[] { 3 })), t1, new CColumn(
      new byte[] { 3 })).getResultIterator();
  assertTrue(iter.hasNext());
  assertCount(iter, 1, 1);
  // get getting columns with matching timestamps
  iter = new RetrieveColumns(new KeyOnlyFilter(t1, new CColumn(
      new byte[] { 4 })), t1).getResultIterator();
  assertTrue(iter.hasNext());
  assertCount(iter, 2, 2);
}