function fn(path, req) {
                return val;
            }
','/ajax/**'];
                    expect(contextMatcher.match(pattern, 'http://localhost/api/foo/bar.json')).to.be.true;
                    expect(contextMatcher.match(pattern, 'http://localhost/ajax/foo/bar.json')).to.be.true;
                    expect(contextMatcher.match(pattern, 'http://localhost/rest/foo/bar.json')).to.be.false;
                });
                it('should return true when both file extensions pattern match', function() {
                    var pattern = ['/**.html','/**.jpeg'];
                    expect(contextMatcher.match(pattern, 'http://localhost/api/foo/bar.html')).to.be.true;
                    expect(contextMatcher.match(pattern, 'http://localhost/api/foo/bar.jpeg')).to.be.true;
                    expect(contextMatcher.match(pattern, 'http://localhost/api/foo/bar.gif')).to.be.false;
                });
            });

            describe('Negation patterns', function() {
                it('should not match file extension', function() {
                    var url = 'http://localhost/api/foo/bar.html';
                    expect(contextMatcher.match(['**', '!*