/**
  * Test getting a reply payload
  * @param  string $messageType
  * @dataProvider provideMessageType
  */
 public function testReplyPayload($messageType)
 {
     $this->config->expects($this->any())->method('getConfigKey')->will($this->returnValue($messageType));
     if ($messageType !== self::SUPPORTED_MESSAGE_TYPE) {
         $this->setExpectedException('eBayEnterprise\\RetailOrderManagement\\Payload\\Exception\\UnsupportedPayload');
     }
     $this->assertSame($this->payload, $this->messageFactory->replyPayload());
 }
 /**
  * Use the IConfig's getConfigKey to get a pair of request/reply payloads.
  * Type will specify if the request or reply payload should be retrieved.
  * @param string $type
  * @return IPayload
  * @throws UnsupportedPayload
  */
 public function messagePayload($type)
 {
     $key = $this->config->getConfigKey();
     if (isset($this->messageTypeMap[$key])) {
         return $this->payloadFactory->buildPayload($this->messageTypeMap[$key][$type], null, null, $this->logger);
     }
     throw new UnsupportedPayload("No payload found for '{$key}'");
 }
 protected function getRequestUrlLogData()
 {
     $context = $this->getContext();
     $logData = ['rom_request_url' => $this->config->getEndpoint()];
     return $context ? $context->getMetaData(__CLASS__, $logData) : [];
 }