public void testRemoveInstance() throws InterruptedException {
MockEndpoint removed = getMockEndpoint("mock:removed");
removed.setExpectedMessageCount(1);
HazelcastInstance h1 = Hazelcast.newHazelcastInstance(null);
h1.getLifecycleService().shutdown();
assertMockEndpointsSatisfied(5000, TimeUnit.MILLISECONDS);
// check headers
Exchange ex = removed.getExchanges().get(0);