public function shouldCreateBeforeProcessesExecutingFactoryWithTheCorrectArguments()
{
$queue = $this->getMock('Liuggio\\Fastest\\Queue\\QueueInterface');
$factory = $this->getMockBuilder('Liuggio\\Fastest\\Process\\ProcessFactory')->disableOriginalConstructor()->getMock();
$factory->expects($this->once())->method('createAProcessForACustomCommand')->with($this->anything(), $this->equalTo(1), $this->equalTo(1), $this->equalTo(true))->willReturn(new Process('echo ' . rand(), sys_get_temp_dir()));
$manager = new ProcessesManager($factory, 1, 'echo "ciao"');
$processes = null;
$this->assertTrue($manager->assertNProcessRunning($queue, $processes));
}