CliMain { private void workflowDisable() throws ExecutionException, InterruptedException { final String component = namespace.getString(parser.workflowDisableComponentId.getDest()); final List<String> workflows = namespace.getList(parser.workflowDisableWorkflowId.getDest()); workflowStateUpdate(component, workflows, WorkflowState.patchEnabled(false)) .forEach(t -> cliOutput .printMessage("Workflow " + t._1 + " in component " + component + " disabled.")); } private  CliMain(
      StyxCliParser parser,
      Namespace namespace,
      String apiHost,
      CliOutput cliOutput,
      CliContext cliContext,
      boolean debug); static void main(String... args);  }
@Test public void testWorkflowDisable() { final String component = "quux"; final WorkflowState workflowState = WorkflowState.builder() .enabled(false) .build(); when(client.updateWorkflowState(any(), any(), eq(workflowState))) .thenReturn(CompletableFuture.completedFuture(workflowState)); CliMain.run(cliContext, "workflow", "disable", component, "foo", "bar"); verify(client).updateWorkflowState(component, "foo", workflowState); verify(client).updateWorkflowState(component, "bar", workflowState); verify(cliOutput).printMessage("Workflow foo in component " + component + " disabled."); verify(cliOutput).printMessage("Workflow bar in component " + component + " disabled."); }