@Test
public void testMainOutputFile() throws IOException {

    File file = File.createTempFile("picocli-codegen", ".json");
    ReflectionConfigGenerator.main("--output", file.getAbsolutePath(), Example.class.getName());
    String expected = read("/example-reflect.json");
    expected = expected.replace("\r\n", "\n");
    expected = expected.replace("\n", System.getProperty("line.separator"));
    String actual = readAndClose(new FileInputStream(file));
    file.delete();
    assertEquals(expected, actual);
}