refactored posts in tests with a utility