/** * @expectedException \Magento\Framework\Webapi\Exception */ public function testNotMatch() { $this->_apiConfigMock->expects($this->once())->method('getRestRoutes')->will($this->returnValue([$this->_routeMock])); $this->_routeMock->expects($this->once())->method('match')->with($this->_request)->will($this->returnValue(false)); $this->_router->match($this->_request); }