     channel3 = new Channel
       name: "TEST DATA - Mock endpoint 3"
       urlPattern: "^/test/mock$"
-      priority: 1
+      priority: 2
       allow: [ "PoC" ]
       routes: [
             name: "test route"

    channel2 = new Channel
      name: "TEST DATA - Mock endpoint 2"
      urlPattern: "^/.*$"
      priority: 2
      allow: [ "PoC" ]
      routes: [
            name: "test route"

            else
              res.text.should.be.exactly 'target1' #should route to target1 via channel2
              done()

    it "should deny access if multiple channels match but the top priority channel denys access", (done) ->
      channel4 = new Channel
        name: "TEST DATA - Mock endpoint 4"
        urlPattern: "^/test/mock$"
        priority: 1
        allow: [ "something else" ]
        routes: [
              name: "test route"
              host: "localhost"
              port: 1234
              primary: true
            ]

      channel4.save () ->

        server.start httpPort: 5001, ->
          request("http://localhost:5001")
            .get("/test/mock")
            .auth("testApp", "password")
            .expect(401)
            .end (err, res) ->
              if err
                done err
              else
                done()
