ConfigurationParser { public static Level getGlobalLevel() { return parse(Configuration.get("level"), Level.TRACE); } private  ConfigurationParser(); static Level getGlobalLevel(); static Map<String, Level> getCustomLevels(); static List<String> getTags(); static boolean isWritingThreadEnabled(); static boolean isAutoShutdownEnabled(); static Level parse(final String property, final Level defaultValue);  }
@Test public void defaultGlobalLevel() { Level level = ConfigurationParser.getGlobalLevel(); assertThat(level).isEqualTo(Level.TRACE); }
@Test public void definedGlobalLevel() { Configuration.set("level", "info"); Level level = ConfigurationParser.getGlobalLevel(); assertThat(level).isEqualTo(Level.INFO); }
@Test public void illegalGlobalLevel() { Configuration.set("level", "test"); Level level = ConfigurationParser.getGlobalLevel(); assertThat(level).isEqualTo(Level.TRACE); assertThat(systemStream.consumeErrorOutput()) .containsOnlyOnce("ERROR").containsOnlyOnce("severity level").containsOnlyOnce("test"); }