public void changeLevel(LoggerLevel level) {
    Level logbackLevel = Level.toLevel(level.name());
    database.enableSqlLogging(level == TRACE);
    helper.changeRoot(serverProcessLogging.getLogLevelConfig(), logbackLevel);
    LoggerFactory.getLogger(ServerLogging.class).info("Level of logs changed to {}", level);
  }
@Test
  @UseDataProvider("supportedSonarApiLevels")
  public void changeLevel_calls_changeRoot_with_LogLevelConfig_and_level_converted_to_logback_class_then_log_INFO_message(LoggerLevel level) {
    LogLevelConfig logLevelConfig = LogLevelConfig.newBuilder(rootLoggerName).build();
    when(serverProcessLogging.getLogLevelConfig()).thenReturn(logLevelConfig);

    underTest.changeLevel(level);

    verify(logbackHelper).changeRoot(logLevelConfig, Level.valueOf(level.name()));
  }