public async Task ShouldReceiveResponseAsExpected()
        {
            // given
            var expectedResponse = new CreateWorkflowInstanceWithResultResponse
            {
                BpmnProcessId       = "process",
                Version             = 1,
                WorkflowKey         = 2,
                WorkflowInstanceKey = 121,
                Variables           = "{\"foo\":\"bar\"}",
            };

            TestService.AddRequestHandler(typeof(CreateWorkflowInstanceWithResultRequest), request => expectedResponse);

            // when
            var workflowInstanceResponse = await ZeebeClient.NewCreateWorkflowInstanceCommand()
                                           .BpmnProcessId("process")
                                           .LatestVersion()
                                           .WithResult()
                                           .Send();

            // then
            Assert.AreEqual(2, workflowInstanceResponse.WorkflowKey);
            Assert.AreEqual(1, workflowInstanceResponse.Version);
            Assert.AreEqual(121, workflowInstanceResponse.WorkflowInstanceKey);
            Assert.AreEqual("process", workflowInstanceResponse.BpmnProcessId);
            Assert.AreEqual("{\"foo\":\"bar\"}", workflowInstanceResponse.Variables);
        }
 public WorkflowInstanceResultResponse(CreateWorkflowInstanceWithResultResponse response)
 {
     WorkflowKey         = response.WorkflowKey;
     BpmnProcessId       = response.BpmnProcessId;
     Version             = response.Version;
     WorkflowInstanceKey = response.WorkflowInstanceKey;
     Variables           = response.Variables;
 }