### Question:
ExpectedLevelResolver implements Function<LogDefinition, LogLevel> { @Override public LogLevel apply(LogDefinition definition) { return min(definition.getLevel(), definition.getIfEnabledLevel()); }  static ExpectedLevelResolver getInstance(); @Override LogLevel apply(LogDefinition definition);  }### Answer:
@Test public void applyErrorWarn() { LogDefinition definition = givenLogDefinition(ERROR, WARN); LogLevel level = expectedLevelResolver.apply(definition); assertThat(level, is(WARN)); }
@Test public void applyTraceDebug() { LogDefinition definition = givenLogDefinition(TRACE, DEBUG); LogLevel level = expectedLevelResolver.apply(definition); assertThat(level, is(TRACE)); }
@Test public void applyInfoInfo() { LogDefinition definition = givenLogDefinition(INFO, INFO); LogLevel level = expectedLevelResolver.apply(definition); assertThat(level, is(INFO)); }