Add unittests for logrotate