cf.setTrustStorePassword("password");
cf.setKeyStore("org/apache/activemq/security" + sep + "client.ks");
cf.setKeyStorePassword("password");
ActiveMQConnection connection = null;
if (username != null || password != null) {
connection = (ActiveMQConnection)cf.createConnection(username, password);
} else {
connection = (ActiveMQConnection)cf.createConnection();
}
TestCase.assertNotNull(connection);
connection.start();