### Question:
Aggregate extends Operator { public void rewind() throws DbException, TransactionAbortedException { aggregateIter.rewind(); } Aggregate(DbIterator child, int agIndex, int gbIndex, Aggregator.Op aggreOp); int groupFieldIndex(); String groupFieldName(); int aggregateFieldIndex(); String aggregateFieldName(); Aggregator.Op aggregateOp(); static String nameOfAggregatorOp(Aggregator.Op aggreOp); void open(); void rewind(); TupleDesc getTupleDesc(); void close(); @Override DbIterator[] getChildren(); @Override void setChildren(DbIterator[] children);  }### Answer:
@Test public void rewind() throws Exception { Aggregate op = new Aggregate(scan1, 1, 0, Aggregator.Op.MIN); op.open(); while (op.hasNext()) { assertNotNull(op.next()); } assertTrue(TestUtil.checkExhausted(op)); op.rewind(); min.open(); TestUtil.matchAllTuples(min, op); }