@Test
public void containerLabels() {

    dockerClient.localImage("resolved-image", "latest");
    DefaultDockerClientFacade facade = new DefaultDockerClientFacade(dockerClient);
    facade.createAgent(CreateAgentParameters.from(Node.EMPTY_OBJECT).
            imageName("resolved-image:latest").
            label("key1", "value1").
            label("key2", "value2"));
    List<Container> containers = dockerClient.getContainers();
    assertThat(containers).hasSize(1);
    assertThat(containers.get(0).getLabels()).containsEntry("key1", "value1").containsEntry("key2", "value2");
}