### Question:
LoggingConfigLoader { @VisibleForTesting void maybeLoadDefaultLogConfiguration(LogManager logManager) throws SecurityException, IOException { logManager.reset(); File logDirectory = new File(caliperDirectory, "log"); logDirectory.mkdirs(); FileHandler fileHandler = new FileHandler(String.format("%s%c%s.%s.log", logDirectory.getAbsolutePath(), File.separatorChar, run.startTime(), run.id())); fileHandler.setEncoding(Charsets.UTF_8.name()); fileHandler.setFormatter(new SimpleFormatter()); Logger globalLogger = logManager.getLogger(""); globalLogger.addHandler(fileHandler); } @Inject  LoggingConfigLoader(@CaliperDirectory File caliperDirectory, LogManager logManager,
      Run run);   }### Answer:
@Test public void testLoadDefaultLogConfiguration() throws SecurityException, IOException { when(logManager.getLogger("")).thenReturn(logger); loader.maybeLoadDefaultLogConfiguration(logManager); verify(logManager).reset(); verify(logger).addHandler(handlerCaptor.capture()); FileHandler fileHandler = (FileHandler) handlerCaptor.getValue(); assertEquals(UTF_8.name(), fileHandler.getEncoding()); assertTrue(fileHandler.getFormatter() instanceof SimpleFormatter); fileHandler.publish(new LogRecord(INFO, "some message")); File logFile = new File(new File(caliperDirectory, "log"), startTime.toString() + "." + runId + ".log"); assertTrue(logFile.isFile()); assertTrue(Files.toString(logFile, UTF_8).contains("some message")); }