public function testInvalidUserType()
{
$customerManager = $this->getMock('Sonata\\Component\\Customer\\CustomerManagerInterface');
$session = $this->getMock('Symfony\\Component\\HttpFoundation\\Session\\Session');
$token = $this->getMock('Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface');
$token->expects($this->once())->method('getUser')->will($this->returnValue(new User()));
$securityContext = $this->getMock('Symfony\\Component\\Security\\Core\\SecurityContextInterface');
$securityContext->expects($this->once())->method('isGranted')->will($this->returnValue(true));
$securityContext->expects($this->once())->method('getToken')->will($this->returnValue($token));
$localeDetector = $this->getMock('Sonata\\IntlBundle\\Locale\\LocaleDetectorInterface');
$localeDetector->expects($this->once())->method('getLocale')->will($this->returnValue('en'));
$customerSelector = new CustomerSelector($customerManager, $session, $securityContext, $localeDetector);
$customerSelector->get();
}