Convert TestMethodAPI over to use FunctionUtilities.callWithScope