CliMain { private void workflowList() throws ExecutionException, InterruptedException { cliOutput.printWorkflows(styxClient.workflows().toCompletableFuture().get()); } private  CliMain(
      StyxCliParser parser,
      Namespace namespace,
      String apiHost,
      CliOutput cliOutput,
      CliContext cliContext,
      boolean debug); static void main(String... args);  }
@Test public void testWorkflowList() { @SuppressWarnings("unchecked") final List<Workflow> payload = mock(List.class); when(client.workflows()) .thenReturn(CompletableFuture.completedFuture(payload)); CliMain.run(cliContext, "workflow", "ls"); verify(client).workflows(); verify(cliOutput).printWorkflows(payload); }