@Test
public void sourceImageIdIsSet() {

    DefaultDockerClientFacade facade = new DefaultDockerClientFacade(dockerClient);
    TestImage img = dockerClient.newLocalImage("resolved-image", "latest");
    String containerId = facade.createAgent(CreateAgentParameters.from(Node.EMPTY_OBJECT).
            imageName("resolved-image:latest")).getId();
    List<Container> containers = dockerClient.getContainers();
    assertThat(containers).hasSize(1).first().matches(container -> container.getId().equals(containerId));
    Container container = containers.get(0);
    assertThat(container.getLabels()).isEqualTo(mapOf(pair(DockerCloudUtils.SOURCE_IMAGE_ID_LABEL, img.getId())));
}