SessionFactory sf = createSessionFactory(props);
HazelcastInstance hz = HazelcastAccessor.getHazelcastInstance(sf);
assertTrue(hz instanceof HazelcastClientProxy);
assertEquals(1, main.getCluster().getMembers().size());
HazelcastClientProxy client = (HazelcastClientProxy) hz;
ClientConfig clientConfig = client.getClientConfig();
assertEquals("dev-custom", clientConfig.getGroupConfig().getName());
assertEquals("dev-pass", clientConfig.getGroupConfig().getPassword());
assertTrue(clientConfig.getNetworkConfig().isSmartRouting());
assertTrue(clientConfig.getNetworkConfig().isRedoOperation());
Hazelcast.newHazelcastInstance(new ClasspathXmlConfig("hazelcast-custom.xml"));
assertEquals(2, hz.getCluster().getMembers().size());
main.shutdown();
Thread.sleep(1000 * 3); // let client to reconnect
assertEquals(1, hz.getCluster().getMembers().size());