public static void PersistAndUpdate(this TestWorkflowRuntime twRuntime, WorkflowIdentity updatedIdentity) { twRuntime.PersistWorkflow(); twRuntime.UnloadWorkflow(); if (null != updatedIdentity) { twRuntime.LoadAndUpdateWorkflow(updatedIdentity.ToString()); } else { twRuntime.LoadWorkflow(); } twRuntime.ResumeWorkflow(); }