@Test public void testDeploymentGroupNotFoundJson() 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, true, null); assertEquals(1, ret); final Map<String, Object> output = Json.read( baos.toString(), new TypeReference<Map<String, Object>>() {}); assertEquals("DEPLOYMENT_GROUP_NOT_FOUND", output.get("status")); }
@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);   }