Add common test function for webservice controller