AlertLevelConverter { public static boolean hasAlertLevel(final Level level) { if (level == Level.FATAL) { return true; } else if (level == Level.ERROR) { return true; } else if (level == Level.WARN) { return true; } else { return level == Level.OFF; } }  static boolean hasAlertLevel(final Level level); static Level toLevel(final AlertLevel alert); static AlertLevel fromLevel(final Level level);  }
@Test public void hasAlertLevel_LevelFatal_returnsTrue() { assertThat(hasAlertLevel(Level.FATAL)).isTrue(); }
@Test public void hasAlertLevel_LevelError_returnsTrue() { assertThat(hasAlertLevel(Level.ERROR)).isTrue(); }
@Test public void hasAlertLevel_LevelWarn_returnsTrue() { assertThat(hasAlertLevel(Level.WARN)).isTrue(); }
@Test public void hasAlertLevel_LevelOff_returnsTrue() { assertThat(hasAlertLevel(Level.OFF)).isTrue(); }
@Test public void hasAlertLevel_LevelAll_returnsFalse() { assertThat(hasAlertLevel(Level.ALL)).isFalse(); }
@Test public void hasAlertLevel_LevelTrace_returnsFalse() { assertThat(hasAlertLevel(Level.TRACE)).isFalse(); }
@Test public void hasAlertLevel_LevelDebug_returnsFalse() { assertThat(hasAlertLevel(Level.DEBUG)).isFalse(); }
@Test public void hasAlertLevel_LevelInfo_returnsFalse() { assertThat(hasAlertLevel(Level.INFO)).isFalse(); }