protected function getNextLinkUri(&$lastObject)
    {
        $currentExpandedProjectionNode = $this->getCurrentExpandedProjectionNode();
        $internalOrderByInfo = $currentExpandedProjectionNode->getInternalOrderByInfo();
        if (!$internalOrderByInfo instanceof InternalOrderByInfo) {
            throw new InvalidOperationException(get_class($internalOrderByInfo));
        }
        $numSegments = count($internalOrderByInfo->getOrderByPathSegments());
        $queryParameterString = $this->getNextPageLinkQueryParametersForRootResourceSet();

        $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject);
        if (empty($skipToken)) {
            throw new InvalidOperationException('!is_null($skipToken)');
        }
        $token = (1 < $numSegments) ? '$skiptoken=' : '$skip=';
        $skipToken = (1 < $numSegments) ? $skipToken : intval(trim($skipToken, '\''));
        $skipToken = '?' . $queryParameterString . $token . $skipToken;

        return $skipToken;
    }