List<ProcessInstance> mockProcessInstanceList = new ArrayList<ProcessInstance>();
mockProcessInstanceList.add(MockProvider.createMockInstance());
mockProcessInstanceList.add(MockProvider.createAnotherMockInstance());
ProcessInstanceQuery instanceQuery = mock(ProcessInstanceQuery.class);
when(instanceQuery.list()).thenReturn(mockProcessInstanceList);
when(processEngine.getRuntimeService().createProcessInstanceQuery()).thenReturn(instanceQuery);
Map<String, Set<String>> params = new HashMap<String, Set<String>>();
Set<String> processInstanceIds = MockProvider.createMockSetFromList(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID_LIST);
params.put("processInstanceIds", processInstanceIds);