refactor testservercontroller