public void testWithOneInvalidProcessId() throws Exception {
DelegateExecution execution = mock(DelegateExecution.class);
when(execution.getVariable(eq(PROCESS_IDS))).thenReturn(Lists.newArrayList("1", "invalid"));
ProcessVariablesCollector collector = new ProcessVariablesCollector();
collector.install(execution);
RuntimeService runtimeService = mockRuntimeService(ImmutableMap.of(
"1", mockProcessInstance(/* ended= */ true)), "invalid");
JavaDelegate delegate = new CheckProcessesEnded(runtimeService, PROCESS_IDS, RESULT);