AgentMain agent1 = m_agent1Test.createAgent(true);
AgentMain agent2 = m_agent2Test.createAgent(true);
IdentifyCommandResponse response;
response = (IdentifyCommandResponse) agent1.getClientCommandSender().sendSynch(new IdentifyCommand());
assert response.isSuccessful() : "Failed to send command from agent1 to agent2";
assert new InvokerLocator(response.getIdentification().getInvokerLocator()).getPort() == agent2
.getServiceContainer().getConfiguration().getConnectorBindPort() : "Didn't get the identify of agent2 - what remoting server did we just communicate with??";
CommandResponse generic_response;
generic_response = agent2.getClientCommandSender().sendSynch(new IdentifyCommand());
assert !generic_response.isSuccessful() : "Should have failed to send command from agent2 to agent1 since it didn't preprocess the command";
assert generic_response.getException() != null;
return;
}