Added tests for server api stop.