@Test
public void finalizeShouldShutdownConnectionManager() throws Throwable {

    ClientConnectionManager clientConnectionManager = mock(ClientConnectionManager.class);
    when(client.getConnectionManager()).thenReturn(clientConnectionManager);
    toTest.finalize();
    verify(clientConnectionManager).shutdown();
}