public void shutdown() {
        isShutdown = true;
        responseHandlerSupplier.shutdown();

        for (ClientInvocation invocation : invocations.values()) {
            //connection manager and response handler threads are closed at this point.
            invocation.notifyExceptionWithOwnedPermission(new HazelcastClientNotActiveException());
        }
    }
@Test
    public void testInvokeUrgent_whenThereAreNoCompactSchemas_andClientIsNotInitializedOnCluster() {
        UUID memberUuid = member.getLocalEndpoint().getUuid();
        member.shutdown();
        makeSureDisconnectedFromServer(client, memberUuid);

        // No compact schemas, no need to check urgent invocations
        assertFalse(client.shouldCheckUrgentInvocations());

        // client is disconnected, so not initialized on cluster
        assertTrueEventually(() -> assertFalse(client.getConnectionManager().clientInitializedOnCluster()));

        ClientConnection connection = mockConnection();

        // Urgent invocations should be done
        ClientInvocation pingInvocation = checkUrgentInvocation_withNoData(connection);
        ClientInvocation setAddInvocation = checkUrgentInvocation_withData(connection);

        verify(connection, times(1)).write(pingInvocation.getClientMessage());
        verify(connection, times(1)).write(setAddInvocation.getClientMessage());
    }