    @Test
    public void testGetEffectiveLevel() throws Exception {

        Constructor<Logger> c = Logger.class.getDeclaredConstructor(String.class);
        c.setAccessible(true);

        Logger logger = c.newInstance("test");
        PaxLoggerImpl loggerImpl = new PaxLoggerImpl(null, logger, null, null, false);

        logger.setLevel(null);
        assertEquals(LogLevel.AUDIT, loggerImpl.getLogLevel());

        logger.setLevel(Level.ALL);
        assertEquals(LogLevel.TRACE, loggerImpl.getLogLevel());

        logger.setLevel(Level.TRACE);
        assertEquals(LogLevel.TRACE, loggerImpl.getLogLevel());

        logger.setLevel(Level.DEBUG);
        assertEquals(LogLevel.DEBUG, loggerImpl.getLogLevel());

        logger.setLevel(Level.INFO);
        assertEquals(LogLevel.INFO, loggerImpl.getLogLevel());

        logger.setLevel(Level.WARN);
        assertEquals(LogLevel.WARN, loggerImpl.getLogLevel());

        logger.setLevel(Level.ERROR);
        assertEquals(LogLevel.ERROR, loggerImpl.getLogLevel());

        logger.setLevel(Level.FATAL);
        assertEquals(LogLevel.ERROR, loggerImpl.getLogLevel());

        logger.setLevel(Level.OFF);
        assertEquals(LogLevel.ERROR, loggerImpl.getLogLevel());
    }