@@ -0,0 +1,1387 @@
+package picocli;%0A%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.contrib.java.lang.system.ProvideSystemProperty;%0Aimport org.junit.contrib.java.lang.system.SystemErrRule;%0Aimport picocli.CommandLine.ArgGroup;%0Aimport picocli.CommandLine.Command;%0Aimport picocli.CommandLine.Help;%0A%0Aimport static java.lang.String.format;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static picocli.TestUtil.usageString;%0A%0Apublic class SynopsisOrderTest %7B%0A%09@Rule%0A%09public final ProvideSystemProperty ansiOFF = new ProvideSystemProperty(%22picocli.ansi%22, %22false%22);%0A%09@Rule%0A%09public final SystemErrRule systemErrRule = new SystemErrRule().enableLog().muteForSuccessfulTests();%0A%0A%09@Command()%0A%09class SynopsisOrder %7B%0A%09%09class Group %7B%0A%09%09%09@CommandLine.Option(names = %22--option1%22, required = true)%0A%09%09%09String value1;%0A%09%09%7D%0A%0A%09%09class AllGroups %7B%0A%09%09%09@CommandLine.ArgGroup(exclusive = false, multiplicity = %221%22, order = 1) Group group;%0A%09%09%09@CommandLine.Option(names = %22--option2%22, required = true, order = 2) String value2;%0A%09%09%7D%0A%0A%09%09@ArgGroup(exclusive = true, multiplicity = %221%22)%0A%09%09AllGroups allGroups;%0A%09%7D%0A%0A%09@Test%0A%09public void testSynopsisOrderForArgGroup() %7B%0A%09%09String result = usageString(new SynopsisOrder(), Help.Ansi.OFF);%0A%09%09assertEquals(format(%22%22 +%0A%09%09%09%09%22Usage: %3Cmain class%3E (--option1=%3Cvalue1%3E %7C (--option2=%3Cvalue2%3E))%25n%22 +%0A%09%09%09%09%22      --option1=%3Cvalue1%3E%25n%22 +%0A%09%09%09%09%22      --option2=%3Cvalue2%3E%25n%22), result);%0A%09%7D%0A%7D%0A

add test for #964