### Question:
Filter extends Operator { public void rewind() throws DbException, TransactionAbortedException { iterator.rewind(); } Filter(Predicate p, DbIterator child); Predicate getPredicate(); TupleDesc getTupleDesc(); void open(); void close(); void rewind(); @Override DbIterator[] getChildren(); @Override void setChildren(DbIterator[] children);  }### Answer:
@Test public void rewind() throws Exception { Predicate pred = new Predicate(0, Predicate.Op.EQUALS, TestUtil.getField(0)); Filter op = new Filter(pred, scan); op.open(); assertTrue(op.hasNext()); assertNotNull(op.next()); assertTrue(TestUtil.checkExhausted(op)); op.rewind(); Tuple expected = Utility.getHeapTuple(0, testWidth); Tuple actual = op.next(); assertTrue(TestUtil.compareTuples(expected, actual)); op.close(); }