### Question:
Arguments implements Iterator<String> { @Override public String next() { if (hasNext()) { return args.get(index++); } throw new NoSuchElementException(); } 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 returnsDefaultValueForMissingArgument() { String arg = RANDOM.string(); String defaultValue = RANDOM.string(); Arguments arguments = new Arguments(new String[] { arg }); assertEquals("Existing", arg, arguments.next(defaultValue)); assertEquals("Default", defaultValue, arguments.next(defaultValue)); }