use of org.kie.kogito.process.ProcessService in project kogito-runtimes by kiegroup.
the class EventImplTest method setup.
@BeforeEach
void setup() {
application = mock(Application.class);
when(application.unitOfWorkManager()).thenReturn(new DefaultUnitOfWorkManager(new CollectingUnitOfWorkFactory()));
process = mock(Process.class);
processInstances = mock(ProcessInstances.class);
processInstance = mock(ProcessInstance.class);
when(process.instances()).thenReturn(processInstances);
when(processInstances.findById(Mockito.anyString())).thenReturn(Optional.of(processInstance));
when(process.createInstance(Mockito.any(DummyModel.class))).thenReturn(processInstance);
processService = mock(ProcessService.class);
executor = Executors.newSingleThreadExecutor();
}
Aggregations