       s.disconnect()
 
     it 'should translate IP objects to legacy events', (done) ->
-      s = new socket.InternalSocket
+      s = new noflo.internalSocket.InternalSocket
       expectedEvents = [
         'connect'
         'data'
         'disconnect'
       ]
       ps =
-        outPorts: new ports.OutPorts
-          out: new outport
-        inPorts: new ports.InPorts
+        outPorts: new noflo.OutPorts
+          out: new noflo.OutPort
+        inPorts: new noflo.InPorts
       ps.inPorts.add 'in',
         datatype: 'string'
         required: true

      s.disconnect()

    it 'should be able to tell the number of contained data packets', ->
      p = new inport
        buffered: true
      s = new socket.InternalSocket
      p.attach s
      s.send 'buffered-data-1'
      s.beginGroup 'foo'

      s.send type: 'data', data: 'some-data'

    it 'should translate legacy events to IP objects', (done) ->
      s = new noflo.internalSocket.InternalSocket
      expectedEvents = [
        'openBracket'
        'data'
        'closeBracket'
      ]
      ps =
        outPorts: new noflo.OutPorts
          out: new noflo.OutPort
        inPorts: new noflo.InPorts
      ps.inPorts.add 'in',
        datatype: 'string'
        required: true
