Move client server control logic to TestController.