function createLinkRedirectRepository(deps = {}) {
    const linkRows = [
        {id: '662194931d0ba6fb37c080ee'}
    ];
    const model = createRedirectModel();
    const models = {
        models: [model]
    };
    return new LinkRedirectRepository({
        LinkRedirect: deps.LinkRedirect || {
            findOne: sinon.stub().returns(model),
            findAll: sinon.stub().returns(models),
            getFilteredCollectionQuery: sinon.stub().returns({
                select: sinon.stub().returns({
                    distinct: sinon.stub().returns(linkRows)
                })
            }),
            add: sinon.stub().callsFake((data) => {
                return createRedirectModel(data);
            })
        },
        urlUtils: deps.urlUtils || {
            urlFor: sinon.stub().returns('https://example.com'),
            relativeToAbsolute: sinon.stub().returns(new URL('https://example.com')),
            absoluteToRelative: sinon.stub().returns('/r/1234abcd')
        },
        cacheAdapter: deps.cacheAdapter || null,
        EventRegistry: deps.EventRegistry || new EventEmitter()
    });
}
Create a LinkRedirectRepository instance with stubbed dependencies
Optionally override dependencies with custom stubs if needed

@param {object} deps
@param {object} [deps.LinkRedirect] - Stubbed LinkRedirect Bookshelf model
@param {object} [deps.urlUtils] - Stubbed URL Utils module
@param {object} [deps.cacheAdapter] - Stubbed cache adapter, or null is cache is disabled
@param {object} [deps.EventRegistry] - Stubbed EventRegistry
@returns {LinkRedirectRepository}