@Test public void getClusterWithValidId() { Cluster cluster = clusterService.getCluster("test"); assertNotNull("Retrieved cluster should not be null with a valid id", cluster); assertEquals("Retrieved cluster name should match the requested cluster id", "Test Cluster", cluster.getDisplayName()); }
public Cluster getCluster(String clusterId) { Cluster cluster = clusters.get(clusterId); if (cluster == null) { throw new EntityNotFoundException( "Cluster with the specified ID not found: ID = " + clusterId); } return cluster; }
ClusterService { public Cluster getCluster(String clusterId) { Cluster cluster = clusters.get(clusterId); if (cluster == null) { throw new EntityNotFoundException( "Cluster with the specified ID not found: ID = " + clusterId); } return cluster; } }
ClusterService { public Cluster getCluster(String clusterId) { Cluster cluster = clusters.get(clusterId); if (cluster == null) { throw new EntityNotFoundException( "Cluster with the specified ID not found: ID = " + clusterId); } return cluster; } @Inject  ClusterService(StormEngine stormEngine, StreamflowConfig streamflowConfig); }
ClusterService { public Cluster getCluster(String clusterId) { Cluster cluster = clusters.get(clusterId); if (cluster == null) { throw new EntityNotFoundException( "Cluster with the specified ID not found: ID = " + clusterId); } return cluster; } @Inject  ClusterService(StormEngine stormEngine, StreamflowConfig streamflowConfig); Collection<Cluster> listClusters(); Cluster addCluster(Cluster cluster); Cluster getCluster(String clusterId); void deleteCluster(String clusterId); void updateCluster(String clusterId, Cluster cluster); ClusterSummary getClusterSummary(String clusterId); }
ClusterService { public Cluster getCluster(String clusterId) { Cluster cluster = clusters.get(clusterId); if (cluster == null) { throw new EntityNotFoundException( "Cluster with the specified ID not found: ID = " + clusterId); } return cluster; } @Inject  ClusterService(StormEngine stormEngine, StreamflowConfig streamflowConfig); Collection<Cluster> listClusters(); Cluster addCluster(Cluster cluster); Cluster getCluster(String clusterId); void deleteCluster(String clusterId); void updateCluster(String clusterId, Cluster cluster); ClusterSummary getClusterSummary(String clusterId);  }