public function testThrowsNotFoundException() { $requestWrapper = new RequestWrapper(['httpHandler' => function ($request, $options = []) { throw new \Exception('', 404); }]); $requestWrapper->send(new Request('GET', 'http://www.example.com')); }