LogWriterFactory { public static InternalLogWriter createLogWriterLogger(final LogConfig logConfig, final boolean secure) { String name = secure ? SECURITY_LOGGER_NAME : MAIN_LOGGER_NAME; return createLogWriterLogger(name, logConfig.getName(), secure); }  static InternalLogWriter createLogWriterLogger(final LogConfig logConfig,
      final boolean secure); static InternalLogWriter toSecurityLogWriter(final InternalLogWriter logWriter); static LogWriterLogger createLogWriterLogger(final String name,
      final String connectionName, final boolean isSecure);  }
@Test public void createLogWriterLoggerReturnsLogWriter() { LogWriterLogger logWriterLogger = LogWriterFactory.createLogWriterLogger(getClass().getName(), testName.getMethodName(), false); assertThat(logWriterLogger).isInstanceOf(LogWriter.class); }
@Test public void createLogWriterLoggerReturnsLoggerWithSpecifiedName() { LogWriterLogger logWriterLogger = LogWriterFactory.createLogWriterLogger(getClass().getName(), testName.getMethodName(), false); assertThat(logWriterLogger.getName()).isEqualTo(getClass().getName()); }
@Test public void createLogWriterLoggerReturnsLoggerWithSpecifiedConnectionName() { LogWriterLogger logWriterLogger = LogWriterFactory.createLogWriterLogger(getClass().getName(), testName.getMethodName(), false); assertThat(logWriterLogger.getConnectionName()).isEqualTo(testName.getMethodName()); }
@Test public void createLogWriterLoggerWithSecureFalseReturnsSecureLogWriter() { LogWriterLogger logWriterLogger = LogWriterFactory.createLogWriterLogger(getClass().getName(), testName.getMethodName(), false); assertThat(logWriterLogger.isSecure()).isFalse(); }
@Test public void createLogWriterLoggerWithSecureTrueReturnsSecureLogWriter() { LogWriterLogger logWriterLogger = LogWriterFactory.createLogWriterLogger(getClass().getName(), testName.getMethodName(), true); assertThat(logWriterLogger.isSecure()).isTrue(); }