Add server leave test.

Fix service list remove and add a test to verify behavior.