/**
  * Tests that requests from clients are sent back as responses
  */
 public function testMessageHandling()
 {
     $authenticationRequest = new AuthenticationRequest($this->configuration->getAccessToken());
     // Authenticate the client
     $this->_manager->handleMessage($authenticationRequest, $this->_clientMock);
     $expectedResponse = new AuthenticationResponse(AuthenticationResponse::STATUS_SUCCESS);
     $this->_clientMock->expects($this->once())->method('send')->with(json_encode($expectedResponse));
     $this->_manager->onMessage($this->_clientMock, json_encode($authenticationRequest));
 }