Refactoring tests to use shared context.