server: add functional tests

Make test coverage >= 90%

#1019 
how about making a new test for this too?