@Test
	public void testStreamDeployUndeployFlow() {
		logger.info("Create tictok stream");
		String streamName = generateStreamName();
		String streamDefinition = "time | log";
		stream().createDontDeploy(streamName, streamDefinition);

		stream().deploy(streamName);
		stream().verifyExists(streamName, streamDefinition, true);

		stream().undeploy(streamName);
		stream().verifyExists(streamName, streamDefinition, false);

		stream().deploy(streamName);
		stream().verifyExists(streamName, streamDefinition, true);
	}
Test stream commands

@author Mark Pollack
@author Kashyap Parikh
@author Andy Clement
@author David Turanski
@author Ilayaperumal Gopinathan
spring-xd-shell/src/test/java/org/springframework/xd/shell/command/AbstractStreamCommandsTests.java