private static function &getMockHierarchyResponse(
        $chainedMethodsBefore,
        $mockClassType,
        $mockClassInstanceId
    ) {
        $rReturnValues = &self::$returnValues[$mockClassType][$mockClassInstanceId];
        // Check return values chain
        foreach ($chainedMethodsBefore as $chainedMethod) {
            $chainedMethodName = key($chainedMethod);
            $chainedMethodArgs = $chainedMethod[$chainedMethodName];

            $serializedChainMethodArgs = serialize($chainedMethodArgs);

            $rReturnValues = & $rReturnValues[$chainedMethodName][$serializedChainMethodArgs];
        }
        return $rReturnValues;
    }