### Question:
CommandUtils { public static String buildSyntax(CommandDescription command, List<String> correctLabels) { String commandSyntax = ChatColor.WHITE + "/" + correctLabels.get(0) + ChatColor.YELLOW; for (int i = 1; i < correctLabels.size(); ++i) { commandSyntax += " " + correctLabels.get(i); } for (CommandArgumentDescription argument : command.getArguments()) { commandSyntax += " " + formatArgument(argument); } return commandSyntax; } private  CommandUtils(); static int getMinNumberOfArguments(CommandDescription command); static int getMaxNumberOfArguments(CommandDescription command); static List<CommandDescription> constructParentList(CommandDescription command); static String constructCommandPath(CommandDescription command); static String buildSyntax(CommandDescription command, List<String> correctLabels); static String formatArgument(CommandArgumentDescription argument);  }### Answer:
@Test public void shouldFormatSimpleArgument() { CommandDescription command = TestCommandsUtil.getCommandWithLabel(commands, "authme"); List<String> labels = Collections.singletonList("authme"); String result = CommandUtils.buildSyntax(command, labels); assertThat(result, equalTo(ChatColor.WHITE + "/authme" + ChatColor.YELLOW)); }
@Test public void shouldFormatCommandWithMultipleArguments() { CommandDescription command = TestCommandsUtil.getCommandWithLabel(commands, "authme", "register"); List<String> labels = Arrays.asList("authme", "reg"); String result = CommandUtils.buildSyntax(command, labels); assertThat(result, equalTo(ChatColor.WHITE + "/authme" + ChatColor.YELLOW + " reg <password> <confirmation>")); }
@Test public void shouldFormatCommandWithOptionalArgument() { CommandDescription command = TestCommandsUtil.getCommandWithLabel(commands, "email"); List<String> labels = Collections.singletonList("email"); String result = CommandUtils.buildSyntax(command, labels); assertThat(result, equalTo(ChatColor.WHITE + "/email" + ChatColor.YELLOW + " [player]")); }