// allow for the server to bootstrap
Thread.sleep(200);
}
protected XMPPConnection connectClient(int port, String username, String password) throws Exception {
ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration("localhost", port);
connectionConfiguration.setCompressionEnabled(false);
connectionConfiguration.setSecurityMode(ConnectionConfiguration.SecurityMode.required);
connectionConfiguration.setSASLAuthenticationEnabled(true);
connectionConfiguration.setDebuggerEnabled(false);
connectionConfiguration.setKeystorePath("src/main/config/bogus_mina_tls.cert");
connectionConfiguration.setTruststorePath("src/main/config/bogus_mina_tls.cert");
connectionConfiguration.setTruststorePassword("boguspw");
XMPPConnection.DEBUG_ENABLED = true;
XMPPConnection client = new XMPPConnection(connectionConfiguration);
client.connect();