unit tests for server