/** Test the constructor. */
@Test public void testConstructor() {
QueryResultIterator queryResultIterator = mock(QueryResultIterator.class);
Query query = mock(Query.class);
IFilterPredicate predicate = mock(IFilterPredicate.class);
when(query.iterator()).thenReturn(queryResultIterator);
SafeIterator iterator = new SafeIterator(query, predicate);
assertSame(queryResultIterator, iterator.getIterator());