added unit tests for server