/**
  * Test that the helper method ebayenterprise_order/factory::getNewCancelSendRequest()
  * when invoked it will instantiate ebayenterprise_order/cancel_send_request object
  * and passing to its constructor method an array with required keys 'api' and 'request', mapped to an instance of
  * type IBidirectionalApi and of type IOrderSummaryRequest respectively. Finally, the helper method
  * ebayenterprise_order/factory::getNewCancelSendRequest() will return the instance of type
  * ebayenterprise_order/cancel_send_request.
  */
 public function testGetNewCancelSendRequest()
 {
     /** @var Mock_IOrderSummaryRequest */
     $request = $this->getMockBuilder(EbayEnterprise_Order_Model_Cancel_Build_IRequest::PAYLOAD_CLASS)->disableOriginalConstructor()->getMock();
     $api = $this->getMockBuilder(static::API_CLASS)->disableOriginalConstructor()->getMock();
     /** @var EbayEnterprise_Order_Model_Cancel_Send_Request */
     $cancelSendRequest = $this->getModelMock('ebayenterprise_order/cancel_send_request', [], false, [['api' => $api, 'request' => $request]]);
     $this->replaceByMock('model', 'ebayenterprise_order/cancel_send_request', $cancelSendRequest);
     $this->assertSame($cancelSendRequest, $this->_factory->getNewCancelSendRequest($api, $request));
 }
 /**
  * Send order cancel payload.
  *
  * @return self
  */
 protected function _sendRequest()
 {
     $this->_response = $this->_factory->getNewCancelSendRequest($this->_api, $this->_request)->send();
     return $this;
 }