Sinon spy & stub unit tests

Here are some basic unit tests implemented with Sinon & Sinon-chai that use spies and stubs.  I chose to unit test what used to be called setupWebSocketServer.  

Not too surprisingly, writing unit tests for this caused me to tweak it a bit so that it's actually more unit-testable.

I may make a few more tweaks this afternoon before requesting review, but I think this is approximately what using Sinon for this stuff would end up looking like.  Thoughts & comments appreciated.