@Test
public void restartAgentContainer() {

    SwarmDockerClientFacade facade = new SwarmDockerClientFacade(dockerClient);
    TestDockerClient.Service service = new TestDockerClient.Service();
    service.pushTask();
    dockerClient.service(service);
    String taskId = facade.restartAgent(service.getId());
    Deque<TestDockerClient.Task> replicas = service.getReplicas();
    assertThat(replicas).hasSize(1).first().matches(replica -> replica.getId().equals(taskId));
}