Use a void logger in tests instead.