public function retrieveLastAddedPact(ResponseFormatter $responseFormatter = null)
    {
        $request = $this->requestBuilder->createRetrieveLastAddedPact($this->baseUrl);

        $response = $this->client->sendRequest($request);
        $this->checkIfResponseIsCorrect($response);

        return new Contract(
            $response->getHeader('X-Pact-Consumer-Version') ? $response->getHeader('X-Pact-Consumer-Version')[0] : '',
            $responseFormatter ? $responseFormatter->format($response) : $response
        );
    }