### Question:
OrderedResultIterator implements PeekingResultIterator { @Override public void close() throws SQLException { if (null != resultIterator) { resultIterator.close(); } resultIterator = PeekingResultIterator.EMPTY_ITERATOR; } OrderedResultIterator(ResultIterator delegate, List<OrderByExpression> orderByExpressions,
            boolean spoolingEnabled, long thresholdBytes, Integer limit, Integer offset);  OrderedResultIterator(ResultIterator delegate, List<OrderByExpression> orderByExpressions,
            boolean spoolingEnabled, long thresholdBytes);  OrderedResultIterator(ResultIterator delegate,
            List<OrderByExpression> orderByExpressions, boolean spoolingEnabled,
            long thresholdBytes, Integer limit, Integer offset, int estimatedRowSize); Integer getLimit(); long getEstimatedByteSize(); long getByteSize(); @Override Tuple next(); @Override Tuple peek(); @Override void close(); @Override void explain(List<String> planSteps); @Override String toString();  }### Answer:
@Test public void testNullIteratorOnClose() throws SQLException { ResultIterator delegate = ResultIterator.EMPTY_ITERATOR; List<OrderByExpression> orderByExpressions = Collections.singletonList(null); int thresholdBytes = Integer.MAX_VALUE; boolean spoolingEnabled = true; OrderedResultIterator iterator = new OrderedResultIterator(delegate, orderByExpressions, spoolingEnabled, thresholdBytes); iterator.close(); }