// now change Z's host to hostZprime
request = createRequest(zName, "hostZprime", 55550, results.getAgentToken());
results = service.registerAgent(request);
assert results != null;
Agent agent = LookupUtil.getAgentManager().getAgentByAgentToken(results.getAgentToken());
assert agent.getName().equals(zName);
assert agent.getAddress().equals("hostZprime");
assert agent.getPort() == 55550;
// now change Z's port to 55551
request = createRequest(zName, "hostZprime", 55551, results.getAgentToken());
results = service.registerAgent(request);
assert results != null;
agent = LookupUtil.getAgentManager().getAgentByAgentToken(results.getAgentToken());
assert agent.getName().equals(zName);
assert agent.getAddress().equals("hostZprime");
assert agent.getPort() == 55551;
// now change Z's host/port to hostZdoubleprime/55552
request = createRequest(zName, "hostZdoubleprime" + tuid, 55552, results.getAgentToken());
results = service.registerAgent(request);
assert results != null;
agent = LookupUtil.getAgentManager().getAgentByAgentToken(results.getAgentToken());
assert agent.getName().equals(zName);
assert agent.getAddress().equals("hostZdoubleprime" + tuid);
assert agent.getPort() == 55552;
// now don't change Z's host/port but re-register everything the same with its token
request = createRequest(zName, "hostZdoubleprime" + tuid, 55552, results.getAgentToken());
results = service.registerAgent(request);
assert results != null;
agent = LookupUtil.getAgentManager().getAgentByAgentToken(results.getAgentToken());
assert agent.getName().equals(zName);
assert agent.getAddress().equals("hostZdoubleprime" + tuid);
assert agent.getPort() == 55552;
// remember this agent so our later tests can use it
AgentRegistrationRequest zReq = request;
AgentRegistrationResults zResults = results;