startDefaultAgent(testHost());
final HeliosClient client = defaultClient();
// Create a job using an image exposing port 11211 but without mapping it
final Job job1 = Job.newBuilder()
.setName(testTag + "memcached")
.setVersion("v1")
.setImage("rohan/memcached-mini")
.build();
final JobId jobId1 = job1.getId();
client.createJob(job1).get();
// Create a job using an image exposing port 11211 and map it to a specific external port
final Job job2 = Job.newBuilder()
.setName(testTag + "memcached")
.setVersion("v2")
.setImage("rohan/memcached-mini")
.setPorts(ImmutableMap.of("tcp", PortMapping.of(11211, externalPort)))
.build();
final JobId jobId2 = job2.getId();
client.createJob(job2).get();
// Wait for agent to come up
awaitHostRegistered(client, testHost(), LONG_WAIT_SECONDS, SECONDS);
awaitHostStatus(client, testHost(), UP, LONG_WAIT_SECONDS, SECONDS);