public static void shutdownAll() {
        for (InstanceFuture<HazelcastClientProxy> future : CLIENTS.values()) {
            try {
                HazelcastClientProxy proxy = future.get();
                HazelcastClientInstanceImpl client = proxy.client;
                if (client == null) {
                    continue;
                }
                proxy.client = null;
                client.shutdown();
            } catch (Throwable ignored) {
                EmptyStatement.ignore(ignored);
            }
        }
        OutOfMemoryErrorDispatcher.clearClients();
        CLIENTS.clear();
    }
@Test
    public void testShutdownAll() {
        HazelcastClient.newHazelcastClient(new ClientConfig()
                .setInstanceName(randomString()));
        HazelcastClient.getOrCreateHazelcastClient(new ClientConfig()
                .setInstanceName(randomString()));

        HazelcastClient.shutdownAll();
        assertEquals(0, HazelcastClient.getAllHazelcastClients().size());
    }