@@ -0,0 +1,2269 @@
+package picocli;%0A%0Aimport org.junit.Test;%0Aimport picocli.CommandLine;%0A%0Aimport picocli.CommandLine.Command;%0Aimport picocli.CommandLine.Option;%0Aimport picocli.CommandLine.Parameters;%0A%0Aimport java.io.PrintWriter;%0Aimport java.io.StringWriter;%0Aimport java.util.concurrent.Callable;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class Issue1225 %7B%0A%0A    @Command(name = %22app%22, mixinStandardHelpOptions = true, version = %22app 1.0%22,%0A            description = %22....%22)%0A    static class App implements Callable%3CInteger%3E %7B%0A%0A        @Parameters(index = %220%22, description = %22...%22)%0A        private String arg1;%0A%0A        @Parameters(index = %221%22, description = %22...%22, defaultValue=%22%22)%0A        private String arg2;%0A%0A        public Integer call() throws Exception %7B%0A            return 0;%0A        %7D%0A        public static void main(String%5B%5D args) %7B%0A            args = new String%5B%5D %7B%22sdf%22, %22sf%22, %22sdf2%22 %7D;%0A            CommandLine cmd = new CommandLine(new App());%0A            cmd.execute(args);%0A%0A            args = new String%5B%5D %7B%22a%22, %22b%22, %22c%22 %7D;%0A            cmd.execute(args);%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void testIssue1225() %7B%0A        CommandLine cmd = new CommandLine(new App());%0A%0A        StringWriter sw = new StringWriter();%0A        cmd.setErr(new PrintWriter(sw));%0A        assertEquals(2, cmd.execute(%22x%22, %22y%22, %22z%22));%0A        assertTrue(sw.toString(), sw.toString().startsWith(%22Unmatched argument at index 2: 'z'%22));%0A%0A        sw = new StringWriter();%0A        cmd.setErr(new PrintWriter(sw));%0A        assertEquals(2, cmd.execute(%22a%22, %22b%22, %22c%22));%0A        assertTrue(sw.toString(), sw.toString().startsWith(%22Unmatched argument at index 2: 'c'%22));%0A    %7D%0A%0A    @Test%0A    public void testIssue1225DifferentInstance() %7B%0A        CommandLine cmd = new CommandLine(new App());%0A%0A        StringWriter sw = new StringWriter();%0A        cmd.setErr(new PrintWriter(sw));%0A        assertEquals(2, cmd.execute(%22x%22, %22y%22, %22z%22));%0A        assertTrue(sw.toString(), sw.toString().startsWith(%22Unmatched argument at index 2: 'z'%22));%0A%0A        sw = new StringWriter();%0A        cmd = new CommandLine(new App());%0A        cmd.setErr(new PrintWriter(sw));%0A        assertEquals(2, cmd.execute(%22a%22, %22b%22, %22c%22));%0A        assertTrue(sw.toString(), sw.toString().startsWith(%22Unmatched argument at index 2: 'c'%22));%0A    %7D%0A%7D%0A

add test