Config config = new Config();
config.getGroupConfig().setName(groupAName);
server1GroupA = Hazelcast.newHazelcastInstance(config);
ClientConfig clientConfig = new ClientConfig();
clientConfig.setGroupConfig(new GroupConfig(config.getGroupConfig().getName()));
client1GroupA = HazelcastClient.newHazelcastClient(clientConfig);
client2GroupA = HazelcastClient.newHazelcastClient(clientConfig);
//setup Group B
config = new Config();
config.getGroupConfig().setName(groupBName);
server1GroupB = Hazelcast.newHazelcastInstance(config);
clientConfig = new ClientConfig();
clientConfig.setGroupConfig(new GroupConfig(config.getGroupConfig().getName()));
client1GroupB = HazelcastClient.newHazelcastClient(clientConfig);
}