public StepInstanceActionResponse bypassStepDependencies(
      WorkflowInstance instance, String stepId, User user, boolean blocking) {
    validateStepId(instance, stepId, Actions.StepInstanceAction.BYPASS_STEP_DEPENDENCIES);
    StepInstance stepInstance =
        getStepInstanceAndValidateBypassStepDependencyConditions(instance, stepId);

    StepAction stepAction = StepAction.createBypassStepDependencies(stepInstance, user);
    saveAction(stepInstance, stepAction);
    if (blocking) {
      return waitBypassStepDependenciesResponseWithTimeout(stepInstance, stepAction);
    } else {
      return createActionResponseFrom(stepInstance, null, stepAction.toTimelineEvent());
    }
  }
@Test
  public void testBypassSignalDependencies() {
    stepInstance.getRuntimeState().setStatus(StepInstance.Status.WAITING_FOR_SIGNALS);
    stepInstance.getStepRetry().setRetryable(false);
    ((TypedStep) stepInstance.getDefinition()).setFailureMode(FailureMode.FAIL_AFTER_RUNNING);
    stepInstanceDao.insertOrUpsertStepInstance(stepInstance, true);
    StepInstanceActionResponse response =
        actionDao.bypassStepDependencies(instance, "job1", user, false);
    Assert.assertEquals("sample-dag-test-3", response.getWorkflowId());
    Assert.assertEquals(1, response.getWorkflowInstanceId());
    Assert.assertEquals(1, response.getWorkflowRunId());
    Assert.assertEquals("job1", response.getStepId());
    Assert.assertEquals(1L, response.getStepAttemptId().longValue());
    Assert.assertEquals(
        "User [tester] take action [BYPASS_STEP_DEPENDENCIES] on the step",
        response.getTimelineEvent().getMessage());
  }