### Question:
CanvasCommandLineRunner { public void run(String... args) throws Exception { CommandLine cmd = parseCommandLine(args); String inputFile = cmd.getOptionValue("input"); String outputFile = cmd.getOptionValue("output"); String yml = FileUtils.readFileToString(new File(inputFile), (String)null); Service service = fromYaml(yml, Service.class); String asciidoc = ServiceToJSon.toAsciidoc(service); FileUtils.write(new File(outputFile), asciidoc, (String) null); }  void run(String... args);  }### Answer:
@Test public void shouldCreateAsciidoc() throws Exception { CanvasCommandLineRunner runner = new CanvasCommandLineRunner(); File tmpFile = File.createTempFile("example", ".adoc"); String resource = getClass().getResource("/example.yml").toExternalForm(); assertTrue(resource.startsWith("file:")); String[] args = new String[]{"--input", resource.substring("file:".length()), "--output", tmpFile.getAbsolutePath()}; runner.run(args); long length = tmpFile.length(); assertTrue("Should be long file: " + length, length > 2000); assertThat(length).isGreaterThan(200); }