configuration.setEndpoint(channelServer.getEndpoint());
configuration.setUri(new URI("" + URI_SCHEME + "://127.0.0.1:" + PORT + ""));
configuration.setOptionMap(OptionMap.create(Options.SASL_POLICY_NOANONYMOUS, Boolean.FALSE));
ProtocolChannelClient client = ProtocolChannelClient.create(configuration);
connection = client.connectSync(new PasswordClientCallbackHandler("TestUser", "localhost.localdomain", "TestUserPassword".toCharArray()));
clientChannel = connection.openChannel(TEST_CHANNEL, OptionMap.EMPTY).get();
try {
clientConnectedLatch.await();
} catch (InterruptedException e) {
throw new RuntimeException(e);