public StepInstanceActionResponse toStepInstanceActionResponse() {
    return StepInstanceActionResponse.builder()
        .workflowId(this.workflowId)
        .workflowInstanceId(this.workflowInstanceId)
        .workflowRunId(this.workflowRunId)
        .stepId(this.stepId)
        .stepAttemptId(this.stepAttemptId)
        .timelineEvent(this.timelineEvent)
        .build();
  }
@Test
  public void testToStepInstanceActionResponse() {
    Mockito.when(stepInstance.getStepId()).thenReturn("test-step");
    Mockito.when(stepInstance.getWorkflowId()).thenReturn("test-workflow");
    Mockito.when(stepInstance.getWorkflowInstanceId()).thenReturn(123L);
    Mockito.when(stepInstance.getWorkflowRunId()).thenReturn(2L);
    RunResponse res = RunResponse.from(stepInstance, TimelineLogEvent.info("bar"));
    StepInstanceActionResponse response = res.toStepInstanceActionResponse();
    Assert.assertEquals("test-workflow", response.getWorkflowId());
    Assert.assertEquals(123, response.getWorkflowInstanceId());
    Assert.assertEquals(2, response.getWorkflowRunId());
    Assert.assertEquals("test-step", response.getStepId());
    Assert.assertEquals(1, response.getStepAttemptId().intValue());
    Assert.assertEquals("bar", response.getTimelineEvent().getMessage());
  }