refactored tests for server to use a test helper
refactored more tests to use the test helper