@Test
public void testWithColumnsSelected() {

  TableAdapter table = new InMemoryTable();
  List<CKeyValue> values = new ArrayList<CKeyValue>();
  values.add(new CKeyValue(new byte[] { 1 }));
  values.add(new CKeyValue(new byte[] { 2 }, new byte[] { 3 },
      new byte[] { 4 }));
  values.add(new CKeyValue(new byte[] { 3 }, new byte[] { 4 },
      new byte[] { 5 }, 0, new byte[] { 6 }));
  table.put(new Put(values));
  KeyOnlyFilter rows = new KeyOnlyFilter(table, new CColumn(new byte[] { 3 }));
  Iterator<Result> results = rows.getResultIterator();
  int count = 0;
  while (results.hasNext()) {
    count++;
    results.next();
  }
  assertEquals(1, count);
  rows = new KeyOnlyFilter(table, new CColumn(new byte[] { 3 }), new CColumn(
      new byte[] { 4 }));
  results = rows.getResultIterator();
  count = 0;
  while (results.hasNext()) {
    count++;
    results.next();
  }
  assertEquals(2, count);
}