Renames and mocks in preparation for separating out the database dependencies from the tests.