@Test public void testDeploymentGroupNotFound() throws Exception { final ListenableFuture<DeploymentGroupStatusResponse> nullFuture = Futures.immediateFuture(null); when(client.deploymentGroupStatus(anyString())).thenReturn(nullFuture); final String name = "non-existent-group"; when(options.getString("name")).thenReturn(name); final int ret = command.run(options, client, out, false, null); assertEquals(1, ret); final String output = baos.toString(); assertThat(output, containsString(format("Unknown deployment group: %s", name))); }
@Override int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException { final String name = options.getString(nameArg.getDest()); final boolean full = options.getBoolean(fullArg.getDest()); return run0(client, out, json, name, full); }
DeploymentGroupStatusCommand extends ControlCommand { @Override int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException { final String name = options.getString(nameArg.getDest()); final boolean full = options.getBoolean(fullArg.getDest()); return run0(client, out, json, name, full); } }
DeploymentGroupStatusCommand extends ControlCommand { @Override int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException { final String name = options.getString(nameArg.getDest()); final boolean full = options.getBoolean(fullArg.getDest()); return run0(client, out, json, name, full); } DeploymentGroupStatusCommand(final Subparser parser); }
DeploymentGroupStatusCommand extends ControlCommand { @Override int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException { final String name = options.getString(nameArg.getDest()); final boolean full = options.getBoolean(fullArg.getDest()); return run0(client, out, json, name, full); } DeploymentGroupStatusCommand(final Subparser parser);  }
DeploymentGroupStatusCommand extends ControlCommand { @Override int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException { final String name = options.getString(nameArg.getDest()); final boolean full = options.getBoolean(fullArg.getDest()); return run0(client, out, json, name, full); } DeploymentGroupStatusCommand(final Subparser parser);   }