Commented and fortified ajaxTest helper method