String nodeId = "TestNodeId";
String ipAddr = "http://localhost:9999";
cmdLineUtility.run(("--url http://localhost:9000"
+ " --operation --addNode --capacity " + capacity + " --nodeId "
+ nodeId + " --ipAddr " + ipAddr).split(" "));
MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
assertEquals("addNode", methodCallDetails.getMethodName());
ResourceNode actualNode = (ResourceNode) methodCallDetails.getArgs().get(0);
ResourceNode expectedNode = new ResourceNode(nodeId, new URL(ipAddr), capacity);
assertEquals(expectedNode.getIpAddr(), actualNode.getIpAddr());
assertEquals(expectedNode.getCapacity(), actualNode.getCapacity());
assertEquals(expectedNode.getNodeId(), actualNode.getNodeId());
}