[server][test] Extract a tester class so that it can be used from other tests.