Wrote methods for use in setting up model tests.