Refactored tests to have reusable logger_helper func.