/**
  * @param object $methodInstance
  * @param bool $isAllowed
  * @param bool $isAvailable
  * @dataProvider restrictAdminBillingAgreementUsageDataProvider
  */
 public function testExecute($methodInstance, $isAllowed, $isAvailable)
 {
     $this->_event->setMethodInstance($methodInstance);
     $this->_authorization->expects($this->any())->method('isAllowed')->with('Magento_Paypal::use')->will($this->returnValue($isAllowed));
     $result = new DataObject();
     $result->setData('is_available', true);
     $this->_event->setResult($result);
     $this->_model->execute($this->_observer);
     $this->assertEquals($isAvailable, $result->getData('is_available'));
 }