refactor server test