public static void setTargetWithSecurity(JLineShellComponent shell, int adminPort) {
		CommandResult result = shell.executeCommand(
				"admin config server --uri http://localhost:" + adminPort + " --username admin --password whosThere");
		assertThat(result.isSuccess(), is(true));
	}
Execute a command and verify the command result.
spring-xd-shell/src/test/java/org/springframework/xd/shell/AbstractShellIntegrationTest.java