@Test
public void testGetResultIterator() {

  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));
  FilteredConstraint filter = new FilteredConstraint(new ResultFilter(table),
      new Filter());
  Utils.testResultIterator(filter.getResultIterator(), 3, 3);
  // test the other methods not covered by simple counting
  SeekingCurrentIterator iter = filter.getResultIterator();
  assertTrue(iter.current() == null);
  iter.seek(new byte[] { 2 });
  assertTrue(iter.current() != null);
  assertTrue(iter.hasNext());
  assertArrayEquals(new byte[] { 3 }, iter.next().getRecordId());
  filter = new FilteredConstraint(new ResultFilter(table),
      new AcceptNoneFilter());
  Utils.testResultIterator(filter.getResultIterator(), 0, 0);
}