@Test
    public void testLogLevels () {
        assertNotNull(LogLevel.UNKNOWN);
        assertNotNull(LogLevel.FATAL);
        assertNotNull(LogLevel.ERROR);
        assertNotNull(LogLevel.WARNING);
        assertNotNull(LogLevel.INFO);
        assertNotNull(LogLevel.CONFIG);
        assertNotNull(LogLevel.EVENT);
        assertNotNull(LogLevel.DEBUG);
        assertNotNull(LogLevel.SPAM);

        // use a set to verify that all are distinct
        Set<Level> seen = new HashSet<Level>();
        assertTrue(seen.add(LogLevel.UNKNOWN));
        assertTrue(seen.add(LogLevel.FATAL));
        assertTrue(seen.add(LogLevel.ERROR));
        assertTrue(seen.add(LogLevel.WARNING));
        assertTrue(seen.add(LogLevel.INFO));
        assertTrue(seen.add(LogLevel.CONFIG));
        assertTrue(seen.add(LogLevel.EVENT));
        assertTrue(seen.add(LogLevel.DEBUG));
        assertTrue(seen.add(LogLevel.SPAM));

        // verify that set would trigger error (not necessary)
        assertTrue(! seen.add(LogLevel.SPAM));
    }
Ensure that all the log levels we need are present
and that they are distinct.
vespalog/src/test/java/com/yahoo/log/LogLevelTestCase.java