@Test
public void shouldHandleWorkflowNotFoundWhenEnabling() {

  final String component = "quux";
  final WorkflowState workflowState = WorkflowState.builder()
      .enabled(true)
      .build();
  final ApiErrorException exception = new ApiErrorException("not found", 404, true, requestId);
  when(client.updateWorkflowState(any(), any(), eq(workflowState)))
      .thenReturn(exceptionallyCompletedFuture(exception));
  CliMain.run(cliContext, "workflow", "enable", component, "foo", "bar");
  verify(cliOutput).printMessage("Workflow foo in component " + component + " not found.");
  verify(cliOutput).printMessage("Workflow bar in component " + component + " not found.");
}