     describe 'Network Protocol', ->
       # Set up a clean graph
       before (done) ->
+        chai.expect(connection, 'Connection needs to be available').not.be.a 'null'
         chai.expect(capabilities, 'Network protocol should be allowed for user').to.contain 'protocol:network'
         waitFor = 5  # set this to the number of commands below
         listener = (message) ->

      connection.once 'message', listener

    describe 'Runtime Protocol', ->
      describe 'requesting runtime metadata', ->
        it 'should provide it back', (done) ->
          connection.once 'message', (message) ->

            done()
          client.on 'connectFailed', (err) ->
            tries--
            chai.expect(tries, 'Connection retry limit must not be exceeded').to.be.above 0
            setTimeout(
              ->
                client.connect address, 'noflo'
