@Test
public void dispose() {

    rmOnExit = false;
    client = createClient();
    DockerImage image = waitForImage(client);
    DockerInstance instance = client.startNewInstance(image, userData);
    waitForInstanceStatus(instance, InstanceStatus.RUNNING);
    client.dispose();
    waitUntil(() -> image.getInstances().isEmpty());
    assertThat(testCloudSupport.getClientFacade().getAgentHolders().isEmpty());
}