### Question:
IdlToSchemataTool implements Tool { @Override public int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception { if (args.isEmpty() || args.size() > 2 || isRequestingHelp(args)) { err.println("Usage: idl2schemata [idl] [outdir]"); err.println(""); err.println("If an output directory is not specified, " + "outputs to current directory."); return -1; } boolean pretty = true; Idl parser = new Idl(new File(args.get(0))); File outputDirectory = getOutputDirectory(args); for (Schema schema : parser.CompilationUnit().getTypes()) { print(schema, outputDirectory, pretty); } parser.close(); return 0; }  @Override int run(InputStream in, PrintStream out, PrintStream err, List<String> args); @Override String getName(); @Override String getShortDescription();  }### Answer:
@Test public void testSplitIdlIntoSchemata() throws Exception { String idl = "src/test/idl/protocol.avdl"; String outdir = "target/test-split"; List<String> arglist = Arrays.asList(idl, outdir); new IdlToSchemataTool().run(null, null, null, arglist); String[] files = new File(outdir).list(); assertEquals(4, files.length); }