Pulling out some logic from common data manager tests.