server: add unit tests

Make test coverage >= 90%

#1019 
It doesn't have further operations on `resp` or `srv`.
all following checks the status so far.