public function throwIfResponseStatusNotOk()
{
$clientMock = $this->createHttpClientMock();
$clientMock->expects($this->once())->method('send')->will($this->returnCallback(function (RequestInterface $request) {
return new Response(404);
}));
$api = new Api(array('sandbox' => false), $clientMock, $this->createHttpMessageFactory());
$api->notifyValidate(array());
}