/**
  * @expectedException \Magento\Framework\Oauth\Exception
  * @expectedExceptionMessage A consumer having the specified key does not exist
  */
 public function testGetConsumerByKeyNonExistentConsumer()
 {
     $consumerKeyString = '12345678901234567890123456789012';
     $consumerId = null;
     $this->consumerFactoryMock->expects($this->once())->method('create')->willReturn($this->consumerMock);
     $this->consumerMock->expects($this->once())->method('loadByKey')->with($consumerKeyString)->willReturnSelf();
     $this->consumerMock->expects($this->once())->method('getId')->willReturn($consumerId);
     $this->tokenProvider->getConsumerByKey($consumerKeyString);
 }