Help { @Autowired public Help(List<ParameterResolver> parameterResolvers) { this.parameterResolvers = parameterResolvers; } @Autowired  Help(List<ParameterResolver> parameterResolvers); @Autowired // ctor injection impossible b/c of circular dependency void setCommandRegistry(CommandRegistry commandRegistry); @Autowired(required = false) void setValidatorFactory(ValidatorFactory validatorFactory); @ShellMethod(value = "Display help about available commands.", prefix = "-") CharSequence help(
			@ShellOption(defaultValue = ShellOption.NULL, valueProvider = CommandValueProvider.class, value = { "-C",
					"--command" }, help = "The command to obtain help for.") String command);  }
@Test public void testCommandHelp() throws Exception { CharSequence help = this.help.help("first-command").toString(); Assertions.assertThat(help).isEqualTo(sample()); }
@Test public void testCommandList() throws Exception { String list = this.help.help(null).toString(); Assertions.assertThat(list).isEqualTo(sample()); }
@Test(expected = IllegalArgumentException.class) public void testUnknownCommand() throws Exception { this.help.help("some unknown command"); }