@Test
public void listAgentServicesMustReportNonRunningAgent() {

    SwarmDockerClientFacade facade = new SwarmDockerClientFacade(dockerClient);
    TestDockerClient.Service service = new TestDockerClient.Service().
            label("foo", "bar");
    service.pushTask().state("stopped");
    dockerClient.service(service);
    List<AgentHolderInfo> servicesInfo = facade.listAgentHolders("foo", "bar");
    assertThat(servicesInfo).hasSize(1);
    AgentHolderInfo serviceInfo = servicesInfo.get(0);
    assertThat(serviceInfo.getId()).isEqualTo(service.getId());
    assertThat(serviceInfo.isRunning()).isFalse();
}