@Test
	public void testShellWithCredentials() throws Exception {
		Bootstrap bootstrap = new Bootstrap();
		JLineShellComponent shell = bootstrap.getJLineShellComponent();
		CommandResult commandResult = shell.executeCommand(
				"admin config server --uri http://localhost:" + adminPort + " --username admin --password whosThere");
		assertThat(commandResult.isSuccess(), is(true));
		commandResult = shell.executeCommand("module list");
		assertThat(commandResult.isSuccess(), is(true));
		assertThat(commandResult.getResult(), instanceOf(Table.class));
		assertThat(((Table) commandResult.getResult()).getHeaders().size(), greaterThan(0));
	}
Tests basic security support in the shell.

@author Marius Bogoevici
spring-xd-shell/src/test/java/org/springframework/xd/shell/security/SecuredShellAccessTests.java