Mock GetWorkflowExecutionHistory

Hey all,
I’m trying to mock GetWorkflowExecutionHistory for a test. My workflow is triggered via SignalWithStartWorkflow and it makes calls to SignalWithStartWorkflowExecution and GetWorkflowExecutionHistory. In my tests, I’m expecting to mock the behaviour of a new workflow.

My current test code for mock returns the following

&temporalWfServ.GetWorkflowExecutionHistoryResponse{
				History: &history.History{
					Events: []*history.HistoryEvent{
						{
							EventId:    1,
							EventTime:  &eventTime,
							EventType:  enums.EventType(1), // EVENT_TYPE_WORKFLOW_EXECUTION_STARTED
							Version:    1,
							TaskId:     1,
							Attributes: nil,
						},
						{
							EventId:    2,
							EventTime:  &eventTime,
							EventType:  enums.EventType(26), // EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED
							Version:    1,
							TaskId:     2,
							Attributes: nil,
						},
					},
				},
				RawHistory:    nil,
				NextPageToken: nil,
				Archived:      false,
			}, nil

However, I’m getting the error: unexpected event type WorkflowExecutionStarted when handling workflow execution result

How do I get this done correctly?

Can you clarify this a bit?

Mocking a history response is rarely the best level to do this at. If you need to mock a workflow execution result, mock that call, not how the internal logic for that call uses history. That internal logic may change in any version. If you need to mock SignalWithStartWorkflow, mock it at that level, don’t mock internal things it might use because that internal logic may change.