// Path: src/test/java/org/jenkinsci/plugins/mesos/fixture/AgentSpecMother.java
// public class AgentSpecMother {
// 
//   public static final MesosAgentSpecTemplate simple =
//       new MesosAgentSpecTemplate(
//           "label",
//           Mode.EXCLUSIVE,
//           "0.1",
//           "32",
//           1,
//           1,
//           1,
//           "0",
//           "",
//           "",
//           Collections.emptyList(),
//           null,
//           null,
//           null);
// 
//   public static final MesosAgentSpecTemplate docker =
//       new MesosAgentSpecTemplate(
//           "label",
//           Mode.EXCLUSIVE,
//           "0.5",
//           "512",
//           3,
//           1,
//           1,
//           "1",
//           "",
//           "",
//           Collections.emptyList(),
//           new ContainerInfo(
//               "DOCKER",
//               "jeschkies/jenkins-simple-agent:testing",
//               false,
//               false,
//               true,
//               Collections.emptyList(),
//               Network.HOST),
//           null,
//           null);
// }


import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.junit.jupiter.api.Assertions.assertThrows;
import akka.actor.ActorSystem;
import akka.stream.ActorMaterializer;
import com.mesosphere.usi.core.models.PodId;
import com.mesosphere.usi.core.models.PodStatus;
import com.mesosphere.usi.core.models.PodStatusUpdatedEvent;
import com.mesosphere.usi.core.models.TaskId;
import hudson.model.Descriptor;
import hudson.model.Node;
import java.io.IOException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import org.apache.mesos.v1.Protos.TaskID;
import org.apache.mesos.v1.Protos.TaskState;
import org.apache.mesos.v1.Protos.TaskStatus;
import org.jenkinsci.plugins.mesos.fixture.AgentSpecMother;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import scala.Option;
package org.jenkinsci.plugins.mesos;



@ExtendWith(TestUtils.JenkinsParameterResolver.class)
public class MesosJenkinsAgentTest {

  static ActorSystem system = ActorSystem.create("agent-test");
  static ActorMaterializer materializer = ActorMaterializer.create(system);

  @Test
  void shortcircuitWaitUntilOnline(TestUtils.JenkinsRule j)
      throws Descriptor.FormException, IOException {
    // Given a Mesos Jenkins agent.
    final MesosJenkinsAgent agent =
        new MesosJenkinsAgent(
            null,
            "failed-agent",
// Path: src/test/java/org/jenkinsci/plugins/mesos/fixture/AgentSpecMother.java
// public class AgentSpecMother {
// 
//   public static final MesosAgentSpecTemplate simple =
//       new MesosAgentSpecTemplate(
//           "label",
//           Mode.EXCLUSIVE,
//           "0.1",
//           "32",
//           1,
//           1,
//           1,
//           "0",
//           "",
//           "",
//           Collections.emptyList(),
//           null,
//           null,
//           null);
// 
//   public static final MesosAgentSpecTemplate docker =
//       new MesosAgentSpecTemplate(
//           "label",
//           Mode.EXCLUSIVE,
//           "0.5",
//           "512",
//           3,
//           1,
//           1,
//           "1",
//           "",
//           "",
//           Collections.emptyList(),
//           new ContainerInfo(
//               "DOCKER",
//               "jeschkies/jenkins-simple-agent:testing",
//               false,
//               false,
//               true,
//               Collections.emptyList(),
//               Network.HOST),
//           null,
//           null);
// }


// Path: src/test/java/org/jenkinsci/plugins/mesos/MesosJenkinsAgentTest.java
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.junit.jupiter.api.Assertions.assertThrows;
import akka.actor.ActorSystem;
import akka.stream.ActorMaterializer;
import com.mesosphere.usi.core.models.PodId;
import com.mesosphere.usi.core.models.PodStatus;
import com.mesosphere.usi.core.models.PodStatusUpdatedEvent;
import com.mesosphere.usi.core.models.TaskId;
import hudson.model.Descriptor;
import hudson.model.Node;
import java.io.IOException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import org.apache.mesos.v1.Protos.TaskID;
import org.apache.mesos.v1.Protos.TaskState;
import org.apache.mesos.v1.Protos.TaskStatus;
import org.jenkinsci.plugins.mesos.fixture.AgentSpecMother;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import scala.Option;

package org.jenkinsci.plugins.mesos;



@ExtendWith(TestUtils.JenkinsParameterResolver.class)
public class MesosJenkinsAgentTest {

  static ActorSystem system = ActorSystem.create("agent-test");
  static ActorMaterializer materializer = ActorMaterializer.create(system);

  @Test
  void shortcircuitWaitUntilOnline(TestUtils.JenkinsRule j)
      throws Descriptor.FormException, IOException {
    // Given a Mesos Jenkins agent.
    final MesosJenkinsAgent agent =
        new MesosJenkinsAgent(
            null,
            "failed-agent",
            AgentSpecMother.simple,