@Test
public void shouldUpdateSelfForAnIdleAgent() {
AgentRuntimeInfo agentRuntimeInfo = new AgentRuntimeInfo(new AgentIdentifier("localhost", "127.0.0.1", "uuid"), AgentRuntimeStatus.Idle, currentWorkingDirectory(), null, false);
AgentRuntimeInfo newRuntimeInfo = new AgentRuntimeInfo(new AgentIdentifier("go02", "10.10.10.1", "uuid"), AgentRuntimeStatus.Idle, currentWorkingDirectory(), "cookie", false);
newRuntimeInfo.setBuildingInfo(new AgentBuildingInfo("Idle", ""));
newRuntimeInfo.setLocation("home");
newRuntimeInfo.setUsableSpace(10L);
newRuntimeInfo.setOperatingSystem("Linux");
agentRuntimeInfo.updateSelf(newRuntimeInfo);
assertThat(agentRuntimeInfo.getBuildingInfo(), is(newRuntimeInfo.getBuildingInfo()));
assertThat(agentRuntimeInfo.getLocation(), is(newRuntimeInfo.getLocation()));
assertThat(agentRuntimeInfo.getUsableSpace(), is(newRuntimeInfo.getUsableSpace()));
assertThat(agentRuntimeInfo.getOperatingSystem(), is(newRuntimeInfo.getOperatingSystem()));
}