private static final String BUSINESS_KEY = UUID.randomUUID().toString();
@Test
public void testSpawnSampleProcessForLocalhost() throws Exception {
DelegateExecution execution = mock(DelegateExecution.class);
Pool pool = mock(Pool.class, withSettings().serializable());
Software software = mock(Software.class, withSettings().serializable());
when(software.isCachedImage()).thenReturn(false);
when(pool.getSoftware()).thenReturn(software);
when(execution.getVariable(eq(CoreProcessVariables.POOL))).thenReturn(pool);
when(execution.getVariable(eq(CoreProcessVariables.POOL_BUSINESS_KEY))).thenReturn(BUSINESS_KEY);
List<Machine> machines = Lists.newArrayList(
Machine.builder().localhost().createMachine(),
Machine.builder().localhost().externalId("local-2").createMachine()
);
when(execution.getVariable(eq(CoreProcessVariables.MACHINES))).thenReturn(machines);
ProcessVariablesCollector collector = new ProcessVariablesCollector();
collector.install(execution);
ProcessEngine processEngine = new StandaloneInMemProcessEngineConfiguration()