public static void tryCloseConnections(HazelcastInstance hazelcastInstance) {
        if (hazelcastInstance == null) {
            return;
        }
        HazelcastInstanceImpl factory = (HazelcastInstanceImpl) hazelcastInstance;
        closeSockets(factory);
    }
@Test
    public void testTryCloseConnections_shouldDoNothingWhenThrowableIsThrown() {
        tryCloseConnections(hazelcastInstanceThrowsException);
    }