@Test
public void containerEnv() {

    SwarmDockerClientFacade facade = new SwarmDockerClientFacade(dockerClient);
    Map<String, String> env = mapOf(pair("key1", "value1"), pair("key2", "value2"));
    facade.createAgent(CreateAgentParameters.from(Node.EMPTY_OBJECT).
            imageName("resolved-image:latest").
            env("key1", "value1").
            env("key2", "value2"));
    List<TestDockerClient.Service> services = dockerClient.getServices();
    assertThat(services).hasSize(1);
    assertThat(services.get(0).getEnv()).isEqualTo(env);
}