Implemented two modes in TestService.