protected static function injectObjectToArray(array &$injectedObjects, $objectName, $mock, $index)
    {
        if ($index === null)
        {
            $injectedObjects[$objectName] = $mock;
        }
        else
        {
            $injectedObjects[$objectName][$index] = $mock;
        }
    }