DeploymentUnit realDepUnitMock = mock(DeploymentUnit.class);
doReturn(realDepUnitMock).when(depUnitMock).getDeploymentUnit();
// - runtime engine
RuntimeEngineImpl runtimeEngineMock = mock(RuntimeEngineImpl.class);
RuntimeManager runtimeMgrMock;
EmptyContext emptyMock = mock(EmptyContext.class);
switch(strategy) {
case PER_PROCESS_INSTANCE:
runtimeMgrMock = mock(PerProcessInstanceRuntimeManager.class);
// this doesn't really do anything since there is no class/cast checking by mockito
doReturn(runtimeEngineMock).when(runtimeMgrMock).getRuntimeEngine(any(ProcessInstanceIdContext.class));