public void destroyedNotReceivedOnClient() throws Exception {
HazelcastInstance instance = Hazelcast.newHazelcastInstance();
HazelcastInstance client = HazelcastClient.newHazelcastClient();
final CountDownLatch createdLatch = new CountDownLatch(1);
final CountDownLatch destroyedLatch = new CountDownLatch(1);
client.addDistributedObjectListener(new DistributedObjectListener() {
@Override
public void distributedObjectCreated(DistributedObjectEvent event) {
createdLatch.countDown();
}