public function createTrustedCookie_CookieNotSet_createNewCookie()
{
$user = $this->createMock('Scheb\\TwoFactorBundle\\Model\\TrustedComputerInterface');
$request = $this->createRequest(null);
//Stub the TrustedTokenGenerator
$this->tokenGenerator->expects($this->any())->method('generateToken')->willReturn('newTrustedCode');
$returnValue = $this->cookieManager->createTrustedCookie($request, $user);
//Validate return value
$validUntil = new \DateTime('2014-01-01 00:10:00 UTC');
$expectedCookie = new Cookie('cookieName', 'newTrustedCode', $validUntil, '/', '.hostname.tld');
$this->assertEquals($expectedCookie, $returnValue);
}