@Test public void testLogTimingStrategy() throws Exception { AuditConfig defaultConfig = givenAuditConfig("com.ericsson.bss.cassandra.ecaudit.logger.Slf4jAuditLogger", Collections.emptyMap()); AuditConfig postLoggingConfig = givenAuditConfig("com.ericsson.bss.cassandra.ecaudit.logger.Slf4jAuditLogger", Collections.emptyMap()); when(postLoggingConfig.isPostLogging()).thenReturn(true); AuditAdapter adapterWithDefaultConfig = AuditAdapterFactory.createAuditAdapter(defaultConfig); AuditAdapter adapterWithPostLogging = AuditAdapterFactory.createAuditAdapter(postLoggingConfig); assertThat(logTimingStrategyIn(adapterWithDefaultConfig)).isSameAs(LogTimingStrategy.PRE_LOGGING_STRATEGY); assertThat(logTimingStrategyIn(adapterWithPostLogging)).isSameAs(LogTimingStrategy.POST_LOGGING_STRATEGY); }
static AuditAdapter createAuditAdapter() { return createAuditAdapter(AuditConfig.getInstance()); }
AuditAdapterFactory { static AuditAdapter createAuditAdapter() { return createAuditAdapter(AuditConfig.getInstance()); } }
AuditAdapterFactory { static AuditAdapter createAuditAdapter() { return createAuditAdapter(AuditConfig.getInstance()); } private  AuditAdapterFactory(); }
AuditAdapterFactory { static AuditAdapter createAuditAdapter() { return createAuditAdapter(AuditConfig.getInstance()); } private  AuditAdapterFactory();  }
AuditAdapterFactory { static AuditAdapter createAuditAdapter() { return createAuditAdapter(AuditConfig.getInstance()); } private  AuditAdapterFactory();   }