TupleIterator implements CloseableIterator<ITuple> { @Override public boolean hasNext() { if (isClosed) { return false; } prepareNext(); return next != null; } TupleIterator(Connection connection, IRdbRelation relation); @Override boolean hasNext(); @Override ITuple next(); @Override void remove(); @Override void close();  }
@Test public void testEmptyRelation() { CloseableIterator<ITuple> iterator = emptyRelation.iterator(); Assert.assertFalse(iterator.hasNext()); }