### Question:
Insert extends Operator { public void open() throws DbException, TransactionAbortedException { hasAccessed=false; super.open(); child.open(); while (child.hasNext()){ Tuple tuple=child.next(); try { Database.getBufferPool().insertTuple(transactionId,tableId,tuple); count++; } catch (IOException e) { e.printStackTrace(); } } } Insert(TransactionId t,DbIterator child, int tableid); TupleDesc getTupleDesc(); void open(); void close(); void rewind(); @Override DbIterator[] getChildren(); @Override void setChildren(DbIterator[] children);  }### Answer:
@Test public void getNext() throws Exception { Insert op = new Insert(tid,scan1, empty.getId()); op.open(); assertTrue(TestUtil.compareTuples( Utility.getHeapTuple(7, 1), op.next())); assertEquals(1, empty.numPages()); }