@Test
public void listAgentServices() {

    SwarmDockerClientFacade facade = new SwarmDockerClientFacade(dockerClient);
    Instant ts = Instant.now();
    TestDockerClient.Service service = new TestDockerClient.Service().
            name("the_service_name").
            label("foo", "bar").
            creationTimestamp(ts);
    TestDockerClient.Task task = service.pushTask().state(TaskRunningState.RUNNING.toString().toLowerCase());
    dockerClient.service(service);
    List<AgentHolderInfo> servicesInfo = facade.listAgentHolders("foo", "bar");
    assertThat(servicesInfo).hasSize(1);
    AgentHolderInfo serviceInfo = servicesInfo.get(0);
    assertThat(serviceInfo.getId()).isEqualTo(serviceInfo.getId());
    assertThat(serviceInfo.getTaskId()).isEqualTo(task.getId());
    assertThat(serviceInfo.isRunning()).isTrue();
    assertThat(serviceInfo.getName()).isEqualTo(serviceInfo.getName());
    assertThat(serviceInfo.getLabels()).isEqualTo(mapOf(pair("foo", "bar")));
    assertThat(serviceInfo.getCreationTimestamp()).isEqualTo(ts);
}