cleaned test_getTriggers() and test_getFunctions() by adding a commonly used function.