}
@Test
public void connectionHandler() {
log.debug("-----------------------------------------------------------------connectionHandler");
TestConnection conn = new TestConnection(host, "/", null);
// add the connection to thread local
Red5.setConnectionLocal(conn);
// resolve root
IScope scope = context.resolveScope("/");
IClientRegistry reg = context.getClientRegistry();
IClient client = reg.newClient(null);
assertNotNull(client);
conn.initialize(client);
if (conn.connect(scope)) {
assertTrue("should have a scope", conn.getScope() != null);
conn.close();
assertTrue("should not be connected", !conn.isConnected());
} else {
assertTrue("didnt connect", false);
}
Red5.setConnectionLocal(null);
}