deployJob(jobId, testHost());
awaitJobState(client, testHost(), jobId, RUNNING, LONG_WAIT_SECONDS, SECONDS);
verify(registrar, timeout((int) SECONDS.toMillis(LONG_WAIT_SECONDS)))
.register(registrationCaptor.capture());
final ServiceRegistration serviceRegistration = registrationCaptor.getValue();
final Map<String, Endpoint> registered = Maps.newHashMap();
for (final Endpoint endpoint : serviceRegistration.getEndpoints()) {
registered.put(endpoint.getName(), endpoint);
}
assertEquals("wrong service", "foo_service", registered.get("foo_service").getName());
assertEquals("wrong protocol", "foo_proto", registered.get("foo_service").getProtocol());