protected function assertPageLoaded($uri, $message = null)
    {
        $status = $this->response->getStatusCode();

        try {
            $this->assertEquals(200, $status);
        } catch (PHPUnitException $e) {
            $message = $message ?: "A request to [{$uri}] failed. Received status code [{$status}].";

            if (isset($this->response->exception)) {
                throw new HttpException($message, 0, $this->response->exception);
            }

            throw new HttpException($message);
        }
    }