final ServiceRegistration.Builder builder = ServiceRegistration.newBuilder();
for (final Map.Entry<ServiceEndpoint, ServicePorts> entry :
job.getRegistration().entrySet()) {
final ServiceEndpoint registration = entry.getKey();
final ServicePorts servicePorts = entry.getValue();
for (String portName : servicePorts.getPorts().keySet()) {
final PortMapping mapping = job.getPorts().get(portName);
if (mapping == null) {
log.error("no '{}' port mapped for registration: '{}'", portName, registration);
continue;
}