$ takeport 3000
occupies the port 3000, use it for testing!
Suppose you want to test how an application behaves with a port already occupied, just run takeport and your app as you always do. Easy and quick.
$ npm install -g takeport
To take the port 8080 run
$ takeport 8080
Port 8080 taken...