@AfterClass
	public static void cleanupMessageBus() {
		if (testMessageBus != null) {
			testMessageBus.cleanup();
			testMessageBus = null;
		}
		if (singleNodeApplication.containerContext().isActive()) {
			ContainerAttributes attribs = singleNodeApplication.containerContext().getBean(ContainerAttributes.class);
			integrationSupport.removePathListener(Paths.build(Paths.MODULE_DEPLOYMENTS, attribs.getId()),
					deploymentsListener);
		}
	}
Shut down the message bus after all tests have completed.
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/stream/AbstractSingleNodeStreamDeploymentIntegrationTests.java