@Test
public void testHttp() throws Exception {
startDefaultMaster();
final HeliosClient client = defaultClient();
startDefaultAgent(testHost(), "--service-registry=" + registryAddress);
awaitHostStatus(client, testHost(), UP, LONG_WAIT_SECONDS, SECONDS);
final HealthCheck healthCheck = HttpHealthCheck.of("http", "/");
final Job job = Job.newBuilder()
.setName(testJobName)
.setVersion(testJobVersion)
.setImage(NGINX)
.setCommand(asList("sh", "-c", "nc -l -p 4711 && nginx -g 'daemon off;'"))
.addPort("poke", PortMapping.of(4711))
.addPort("http", PortMapping.of(80))
.addRegistration(ServiceEndpoint.of("foo_service", "foo_proto"), ServicePorts.of("http"))
.setHealthCheck(healthCheck)
.build();
assertContainerRegistersAfterPoke(client, job);
}