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