@Test
	public void testZooKeeperClientConnectString() {
		String zkClientConnect = "localhost:3181,localhost:3182,localhost:3183";

		setUp(zkClientConnect, null, true);

		ZooKeeperConnection zooKeeperConnection = this.containerContext.getBean(ZooKeeperConnection.class);
		zooKeeperConnection.start();
		assertFalse(zooKeeperConnection.getRetryPolicy().allowRetry(0, 0, null));

		String actualClientConnect = this.containerContext.getEnvironment().getProperty("zk.client.connect");
		assertEquals(zkClientConnect, actualClientConnect);
		try {
			this.containerContext.getBean(EmbeddedZooKeeper.class);
			fail("EmbeddedZookeeper instance should not be created with connection String set");
		}
		catch (Exception e) {

		}
		finally {
			System.clearProperty("zk.client.connect");
			System.clearProperty("zk.embedded.server.port");
			System.clearProperty("xd.extensions.basepackages");
			System.clearProperty("zk.client.connection.configured");
		}
	}
This test assumes there is no ZK server running for the connect string. It should work either way since the test
does not actually connect. It overrides the ZK RetryPolicy to not attempt a reconnect. {@see
ZooKeeperConnectionConfiguration}. Without that, this test will hang for a very long time.
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/config/ZookeeperClientConnectTests.java