move server unit tests into server file