void compareLoggers(ControlLogger controlLogger, Logger logger) {
    assertEquals(controlLogger.getName(), logger.getName());
    assertEquals(controlLogger.getEffectiveLevel(), logger.getEffectiveLevel());

    Level controlLevel = controlLogger.getLevel();
    Level level = logger.getLevel();

    if (controlLevel == null) {
      assertNull(level);
    } else {
      assertEquals(controlLevel, level);
    }
  }
  void compareLoggerContexts(ControlLoggerContext controlLC, LoggerContext lc) {
    Map<String, ControlLogger> controlLoggerMap = controlLC.getLoggerMap();

    assertEquals(controlLoggerMap.size() + 1, lc.size());

    for (String loggerName : controlLoggerMap.keySet()) {

      Logger logger = lc.exists(loggerName);
      ControlLogger controlLogger = (ControlLogger) controlLoggerMap.get(loggerName);
      if (logger == null) {
        throw new IllegalStateException("logger" + loggerName + " should exist");
      }
      assertEquals(loggerName, logger.getName());
      assertEquals(loggerName, controlLogger.getName());

      compareLoggers(controlLogger, logger);
    }
  }