@Test public void testCreateServerWithInvalidClusterControllerName() throws Exception { AbstractClusterCommand clusterCommand = new AbstractClusterCommand("name", "description", new ClusterControllerFactory()) { @Override public int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception { return 0; } }; clusterCommand.createClusterController("bar"); }
protected ClusterController createClusterController(String serviceName) { ClusterController controller = factory.create(serviceName); if (controller == null) { LOG.warn("Unable to find service {}, using default.", serviceName); controller = factory.create(null); } return controller; }
AbstractClusterCommand extends Command { protected ClusterController createClusterController(String serviceName) { ClusterController controller = factory.create(serviceName); if (controller == null) { LOG.warn("Unable to find service {}, using default.", serviceName); controller = factory.create(null); } return controller; } }
AbstractClusterCommand extends Command { protected ClusterController createClusterController(String serviceName) { ClusterController controller = factory.create(serviceName); if (controller == null) { LOG.warn("Unable to find service {}, using default.", serviceName); controller = factory.create(null); } return controller; } AbstractClusterCommand(String name, String description, ClusterControllerFactory factory);  AbstractClusterCommand(String name, String description, ClusterControllerFactory factory,
        ClusterStateStoreFactory stateStoreFactory); }
AbstractClusterCommand extends Command { protected ClusterController createClusterController(String serviceName) { ClusterController controller = factory.create(serviceName); if (controller == null) { LOG.warn("Unable to find service {}, using default.", serviceName); controller = factory.create(null); } return controller; } AbstractClusterCommand(String name, String description, ClusterControllerFactory factory);  AbstractClusterCommand(String name, String description, ClusterControllerFactory factory,
        ClusterStateStoreFactory stateStoreFactory); @Override void printUsage(PrintStream stream); }
AbstractClusterCommand extends Command { protected ClusterController createClusterController(String serviceName) { ClusterController controller = factory.create(serviceName); if (controller == null) { LOG.warn("Unable to find service {}, using default.", serviceName); controller = factory.create(null); } return controller; } AbstractClusterCommand(String name, String description, ClusterControllerFactory factory);  AbstractClusterCommand(String name, String description, ClusterControllerFactory factory,
        ClusterStateStoreFactory stateStoreFactory); @Override void printUsage(PrintStream stream);  }