modularize testHelperFunctions for userActionTest