public function testExecute($type, $name, $expected, $exists)
{
$application = $this->getApplication();
$application->add(new ClassLookupCommand());
$command = $this->getApplication()->find('dev:class:lookup');
$commandTester = new CommandTester($command);
$commandTester->execute(array('command' => $command->getName(), 'type' => $type, 'name' => $name));
$output = $commandTester->getDisplay();
$this->assertRegExp(sprintf('/%s/', $expected), $output);
$existsAssertion = !$exists ? 'assertRegExp' : 'assertNotRegExp';
$this->{$existsAssertion}(sprintf('/%s/', 'does not exist'), $output);
}