@Test public void testLogEvent () { Logger logger = (Logger) LoggerFactory.getLogger(ConsoleNotification.class); ArgumentCaptor<ILoggingEvent> iLoggingEventCaptor = ArgumentCaptor.forClass(ILoggingEvent.class); @SuppressWarnings("unchecked") final Appender<ILoggingEvent> appender = mock(Appender.class); logger.addAppender(appender); logger.setLevel(Level.DEBUG); consoleNotification.logNotification(chaosNotification); verify(chaosNotification, times(1)).getMessage(); verify(appender, times(1)).doAppend(iLoggingEventCaptor.capture()); ILoggingEvent iLoggingEvent = iLoggingEventCaptor.getValue(); assertEquals(MESSAGE, iLoggingEvent.getMessage()); assertEquals(Level.DEBUG, iLoggingEvent.getLevel()); }
@Override public void logNotification (ChaosNotification notification) { log.debug(notification.getMessage(), StructuredArguments.value(notification.getClass().getSimpleName(), notification)); }
ConsoleNotification implements NotificationMethods { @Override public void logNotification (ChaosNotification notification) { log.debug(notification.getMessage(), StructuredArguments.value(notification.getClass().getSimpleName(), notification)); } }
ConsoleNotification implements NotificationMethods { @Override public void logNotification (ChaosNotification notification) { log.debug(notification.getMessage(), StructuredArguments.value(notification.getClass().getSimpleName(), notification)); } ConsoleNotification(); }
ConsoleNotification implements NotificationMethods { @Override public void logNotification (ChaosNotification notification) { log.debug(notification.getMessage(), StructuredArguments.value(notification.getClass().getSimpleName(), notification)); } ConsoleNotification(); @Override void logNotification(ChaosNotification notification); }
ConsoleNotification implements NotificationMethods { @Override public void logNotification (ChaosNotification notification) { log.debug(notification.getMessage(), StructuredArguments.value(notification.getClass().getSimpleName(), notification)); } ConsoleNotification(); @Override void logNotification(ChaosNotification notification);  }