Refactoring: moved log messages, formats, etc to based test factory.