Refactoring tests to centralize verification method.