Cluster { public void addNode(NodeTask node) { this.nodes.add(node); } Cluster(); String getClusterId(); String getClusterName(); void setClusterName(String clusterName); Collection<NodeTask> getNodes(); void addNode(NodeTask node); void addNodes(Collection<NodeTask> nodes); void removeNode(NodeTask task); void removeAllNodes(); String getResourceManagerHost(); void setResourceManagerHost(String resourceManagerHost); String getResourceManagerPort(); void setResourceManagerPort(String resourceManagerPort); double getMinQuota(); void setMinQuota(double minQuota); String toString();  }
@Test public void testAddNode() throws Exception { resetCluster(); cluster.addNode(task1); assertEquals(1, cluster.getNodes().size()); cluster.addNode(task2); assertEquals(2, cluster.getNodes().size()); }