ImmutableMap.<String,String>of(), ImmutableSet.<String>of(), processors,
1024, ImmutableList.<Volume>of(), null);
when(node.getHardware()).thenReturn(hardware);
Builder<Instance> instances = ImmutableSet.<Instance>builder();
Instance master = new Instance(new Credentials("", ""),
ImmutableSet.of(HadoopNameNodeClusterActionHandler.ROLE,
HadoopJobTrackerClusterActionHandler.ROLE),
"10.0.0.1", "10.0.0.1", "1", node, fakeDnsResolver);
instances.add(master);
for (int i = 0; i < numberOfWorkers; i++) {
int id = i + 2;
instances.add(new Instance(new Credentials("", ""),
ImmutableSet.of(HadoopDataNodeClusterActionHandler.ROLE,
HadoopTaskTrackerClusterActionHandler.ROLE),
"10.0.0." + id, "10.0.0." + id, id + "", node, fakeDnsResolver));
}
return new Cluster(instances.build());