Made server port number configurable
Added test to make sure server callback is called when stop() called