@Test
public void testShellWithMissingUsername() throws Exception {
Bootstrap bootstrap = new Bootstrap();
JLineShellComponent shell = bootstrap.getJLineShellComponent();
CommandResult commandResult = shell.executeCommand("admin config server --uri http://localhost:" + adminPort + " --password whosThere");
assertThat(commandResult.isSuccess(), is(true));
Configuration configuration = bootstrap.getApplicationContext().getBean(Configuration.class);
assertThat(configuration.getTarget().getTargetException(), instanceOf(IllegalArgumentException.class));
assertThat(configuration.getTarget().getTargetException().getMessage(), equalTo("A password may be specified only together with a user name"));
commandResult = shell.executeCommand("module list");