Refactored FunctionalTests. (Added a private method.)