Refactor TestFramework helper functions into CoreUtils