private function createCommandTester(ContainerInterface $container, Application $application = null)
 {
     if (null === $application) {
         $application = new Application();
     }
     $application->setAutoExit(false);
     $command = new DemoteUserCommand();
     $command->setContainer($container);
     $application->add($command);
     return new CommandTester($application->find('fos:user:demote'));
 }