private String generateGroupUsage(CommandInvocation invocation, GroupParser parser)
    {
        StringBuilder sb = new StringBuilder();
        for (Parameter parameter : parser.getPositional())
        {
            sb.append(generateParameterUsage(invocation, parameter)).append(" ");
        }

        for (Parameter parameter : parser.getNonPositional())
        {
            sb.append(generateParameterUsage(invocation, parameter)).append(" ");
        }

        for (Parameter parameter : parser.getFlags())
        {
            if (parameter.getParser() instanceof FlagParser)
            {
                sb.append(generateFlagUsage(invocation, parameter)).append(" ");
            }
            else
            {
                throw new IllegalArgumentException("Expected FlagParameter but found " + parameter.getClass().getName());
            }
        }
        return sb.toString();
    }