public function beginAuthentication_twoFactorPossible_codeGenerated()
{
$user = $this->getUser(true);
$context = $this->getAuthenticationContext($user);
//Mock the CodeGenerator
$this->generator->expects($this->once())->method('generateAndSend')->with($user);
$this->provider->beginAuthentication($context);
}