assertEquals(4, wanted.size());
assertEquals(0, rt.getWantedResources().size());
List<ResourceGrant> grants = new ArrayList<ResourceGrant>();
for (int i = 0; i < 4; i++) {
ResourceGrant grant =
new ResourceGrant(i+1, TstUtils.getNodeHost(i),
TstUtils.getNodeAddress(i), ClusterManager.clock.getTime(),
wanted.get(i).getType());
grant.setAppInfo("192.168.0.1:1234"); // some random app info.
grants.add(grant);
}
// Grant the initial need.
rt.addNewGrants(grants);