@Test
public void mustBindAgentHolderToInstance() {

    client = createClient();
    DockerImage image = waitForImage(client);
    DockerInstance instance = client.startNewInstance(image, userData);
    waitForInstanceStatus(instance, InstanceStatus.RUNNING);
    TestDockerClientFacade clientFacade = testCloudSupport.getClientFacade();
    AgentHolder agentHolder = clientFacade.getAgentHolders().iterator().next();
    assertThat(instance.getAgentHolderId()).isEqualTo(Optional.of(agentHolder.getId()));
    assertThat(instance.getResolvedImageName()).isEqualTo(Optional.of("image:latest"));
    assertThat(instance.getAgentHolderName()).isEqualTo(Optional.of(agentHolder.getName()));
}