Extract FormatterTestCase to utils module