CliMain { private void workflowShow() throws ExecutionException, InterruptedException { var component = namespace.getString(parser.workflowShowComponentId.getDest()); var workflow = namespace.getString(parser.workflowShowWorkflowId.getDest()); var workflowWithStateFuture = styxClient.workflowWithState(component, workflow).toCompletableFuture().get(); cliOutput.printWorkflow(workflowWithStateFuture.workflow(), workflowWithStateFuture.state()); } private  CliMain(
      StyxCliParser parser,
      Namespace namespace,
      String apiHost,
      CliOutput cliOutput,
      CliContext cliContext,
      boolean debug); static void main(String... args);  }
@Test public void testWorkflowShow() { var payload = mock(WorkflowWithState.class); when(client.workflowWithState("foo", "bar")) .thenReturn(CompletableFuture.completedFuture(payload)); CliMain.run(cliContext, "workflow", "show", "foo", "bar"); verify(client).workflowWithState("foo", "bar"); verify(cliOutput).printWorkflow(payload.workflow(), payload.state()); }