### Question:
FileListIterator implements Iterator<File> { @Override public File next() { return hasNext() ? (curr = next) : null; } FileListIterator(File dir, boolean recursive); @Override boolean hasNext(); @Override File next(); @Override void remove();  }### Answer:
@Test public void testNext_empty() throws Exception { assertNull(new FileListIterator(new MockFile("R", true), false).next()); assertNull(new FileListIterator(new MockFile("R", true), true).next()); }