### Question:
Arguments implements Iterator<String> { public File file(String defaultValue) { return new File(next(defaultValue)); } Arguments(String[]... args); @Override boolean hasNext(); @Override String next(); @Override void remove(); String next(String defaultValue); File file(String defaultValue); File file(); Properties properties(); void prev(); boolean logical(boolean defaultValue);  }### Answer:
@Test public void convertsToFile() { String fileName = RANDOM.string(); String defaultValue = RANDOM.string(); Arguments arguments = new Arguments(new String[] { fileName }); assertEquals("Existing", new File(fileName), arguments.file()); assertEquals("Default", new File(defaultValue), arguments.file(defaultValue)); }