@Test
public void testLevelNameForValue() throws Exception {

    for (Level level : new Level[] {
            Level.CONFIG,
            Level.FINEST,
            Level.FINER,
            Level.FINE,
            Level.INFO,
            Level.WARNING,
            Level.SEVERE,}) {
        assertEquals(level.getName(), Util.logLevelNameForValue(level.intValue()));
    }
    // Check that anything more severe that WARNING will produce
    // expected result.
    assertEquals("NUCLEAR", Util.logLevelNameForValue(Level.SEVERE.intValue() + 1));
}