launchForTestingFromStateWith

@TestOnly
fun <T, PropsT, StateT, OutputT, RenderingT> StatefulWorkflow<PropsT, StateT, OutputT, RenderingT>.launchForTestingFromStateWith(    props: PropsT,     initialState: StateT,     context: CoroutineContext = EmptyCoroutineContext,     block: WorkflowTestRuntime<PropsT, OutputT, RenderingT>.() -> T): T(source)
@TestOnly
fun <StateT, OutputT, RenderingT> StatefulWorkflow<Unit, StateT, OutputT, RenderingT>.launchForTestingFromStateWith(    initialState: StateT,     context: CoroutineContext = EmptyCoroutineContext,     block: WorkflowTestRuntime<Unit, OutputT, RenderingT>.() -> Unit)(source)

Creates a WorkflowTestRuntime to run this workflow for unit testing. If the workflow is stateful, initialState is not called. Instead, the workflow is started from the given initialState.

All workflow-related coroutines are cancelled when the block exits.