public function shouldNotAddNotifyUrlIfAlreadySet()
{
$details = new \ArrayObject(array('PAYMENTREQUEST_0_NOTIFYURL' => 'alreadySetUrl'));
$captureToken = new Token();
$captureToken->setGatewayName('theGatewayName');
$captureToken->setDetails($details);
$tokenFactoryMock = $this->getMock(GenericTokenFactoryInterface::class);
$tokenFactoryMock->expects($this->never())->method('createNotifyToken');
$action = new AuthorizeAction();
$action->setGateway($this->createGatewayMock());
$action->setGenericTokenFactory($tokenFactoryMock);
$request = new Authorize($captureToken);
$request->setModel($details);
$action->execute($request);
$this->assertArrayHasKey('PAYMENTREQUEST_0_NOTIFYURL', $details);
$this->assertEquals('alreadySetUrl', $details['PAYMENTREQUEST_0_NOTIFYURL']);
}