class GraalReflectionFileGenerator {

    public void generateReflection(CommandLineParser<CommandInvocation> parser, Writer w) throws IOException {
        w.append('[').append(getLineSeparator());
        processCommand(parser, w);
        appendOptions(w);
        w.append(getLineSeparator()).append("]");
    }

}

class GraalReflectionFileGeneratorTest {

    @Test
    public void testCommandWithFileOption() throws IOException {


        GraalReflectionFileGenerator generator = new GraalReflectionFileGenerator();
        CommandLineParser<CommandInvocation> parser = getParser(TestCommand3.class);

        StringWriter writer = new StringWriter();
        generator.generateReflection(parser, writer);
        assertEquals(readFile("src/test/resources/graal3"), writer.toString());
    }

}