server1 = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP,
ConnectionType.NETTY_HTTP);
server1.startListener();
Assert.assertEquals("SessionServer is not listening", true, server1.isListening());
sessionServer1 = server1.newSessionServer(TestConstants.sesServiceName1);
SCSessionServerCallback cbk1 = new SesSrvCallback(sessionServer1);
sessionServer1.register(1, 1, cbk1);
Assert.assertEquals("SessionServer is not registered", true, sessionServer1.isRegistered());
server2 = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP + 1,
ConnectionType.NETTY_HTTP);
server2.startListener();
Assert.assertEquals("SessionServer is not listening", true, server2.isListening());
sessionServer2 = server2.newSessionServer(TestConstants.sesServiceName1);
SCSessionServerCallback cbk2 = new SesSrvCallback(sessionServer2);
sessionServer2.register(1, 1, cbk2);
Assert.assertEquals("SessionServer is not registered", true, sessionServer2.isRegistered());
sessionServer1.deregister();
Assert.assertEquals("SessionServer is registered", false, sessionServer1.isRegistered());