public static void doShutdown() {
		if (SHUTDOWN_AFTER_RUN) {
			logger.info("Stopping XD Shell");
			shell.stop();
			if (application != null) {
				logger.info("Stopping Single Node Server");
				application.close();
				redisAvailableRule.getResource().destroy();
				application = null;
			}
			System.clearProperty("security.basic.enabled");
			System.clearProperty("security.user.name");
			System.clearProperty("security.user.password");
			System.clearProperty("security.user.role");
		}
	}
Used to capture currently executing test method.
spring-xd-shell/src/test/java/org/springframework/xd/shell/AbstractShellIntegrationTest.java