@Before
	public void setup() throws BindException {
		System.setProperty("XD_TRANSPORT", "local");
		MockitoAnnotations.initMocks(this);
		EmbeddedZooKeeper embeddedZooKeeper = new EmbeddedZooKeeper();
		embeddedZooKeeper.start();
		this.zkConnection = new ZooKeeperConnection("localhost:" + embeddedZooKeeper.getClientPort());
		zkConnection.start();
		while (!zkConnection.isConnected()) {
			try {
				Thread.sleep(100);
			}
			catch (InterruptedException e) {
				Thread.currentThread().interrupt();
				throw new IllegalStateException("interrupted while waiting for ZK connection");
			}
		}
		plugin = new StreamPlugin(bus, zkConnection);
	}
@author Mark Fisher
@author Jennifer Hickey
@author Gary Russell
@author David Turanski
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/plugins/stream/StreamPluginTests.java