### Question:
RadlValidator implements Application { public void validate(Arguments arguments, Map<String, Collection<Issue>> issues, File reportDir) { validate(arguments, newValidator(), issues, reportDir); }  static void main(String[] args); @Override int run(Arguments arguments); void validate(Arguments arguments, Map<String, Collection<Issue>> issues, File reportDir);  }### Answer:
@SuppressWarnings("unchecked") @Test public void validatesAllFiles() throws IOException { int numFiles = RANDOM.integer(2, 5); String[] files = new String[numFiles]; String[] fileNames = new String[numFiles]; char ch = 'a'; for (int i = 0; i < numFiles; i++) { files[i] = randomFileName(ch++); fileNames[i] = new File(files[i]).getName(); } Arguments args = new Arguments(files); Validator validator = mock(Validator.class); Map<String, Collection<Issue>> issues = new TreeMap<>(); radlValidator.validate(args, validator, issues, dir); verify(validator, times(files.length)).validate(any(FileInputStream.class), any(Collection.class)); TestUtil.assertCollectionEquals("Validated files", Arrays.asList(fileNames), issues.keySet()); }