@Test public void delegatesExceptionDuringUpdateToAllLoggers() throws Exception { ExceptionDuringUpdate<String, Integer> testCase = ExceptionDuringUpdate.create("Something bad happened", 6, Exception.class); underTest.exceptionDuringUpdate(testCase.model(), testCase.event(), testCase.createException()); assertTestCaseLogged(testCase); }
@Override public void exceptionDuringUpdate(M model, E event, Throwable exception) { for (Logger<M, E, F> logger : loggersReversed) { logger.exceptionDuringUpdate(model, event, exception); } }
CompositeLogger implements Logger<M, E, F> { @Override public void exceptionDuringUpdate(M model, E event, Throwable exception) { for (Logger<M, E, F> logger : loggersReversed) { logger.exceptionDuringUpdate(model, event, exception); } } }
CompositeLogger implements Logger<M, E, F> { @Override public void exceptionDuringUpdate(M model, E event, Throwable exception) { for (Logger<M, E, F> logger : loggersReversed) { logger.exceptionDuringUpdate(model, event, exception); } } private  CompositeLogger(List<Logger<M, E, F>> loggers); }
CompositeLogger implements Logger<M, E, F> { @Override public void exceptionDuringUpdate(M model, E event, Throwable exception) { for (Logger<M, E, F> logger : loggersReversed) { logger.exceptionDuringUpdate(model, event, exception); } } private  CompositeLogger(List<Logger<M, E, F>> loggers); @SafeVarargs static Logger<M, E, F> from(Logger<M, E, F> logger, Logger<M, E, F>... loggers); @Override void beforeInit(M model); @Override void afterInit(M model, First<M, F> result); @Override void exceptionDuringInit(M model, Throwable exception); @Override void beforeUpdate(M model, E event); @Override void afterUpdate(M model, E event, Next<M, F> result); @Override void exceptionDuringUpdate(M model, E event, Throwable exception); }
CompositeLogger implements Logger<M, E, F> { @Override public void exceptionDuringUpdate(M model, E event, Throwable exception) { for (Logger<M, E, F> logger : loggersReversed) { logger.exceptionDuringUpdate(model, event, exception); } } private  CompositeLogger(List<Logger<M, E, F>> loggers); @SafeVarargs static Logger<M, E, F> from(Logger<M, E, F> logger, Logger<M, E, F>... loggers); @Override void beforeInit(M model); @Override void afterInit(M model, First<M, F> result); @Override void exceptionDuringInit(M model, Throwable exception); @Override void beforeUpdate(M model, E event); @Override void afterUpdate(M model, E event, Next<M, F> result); @Override void exceptionDuringUpdate(M model, E event, Throwable exception);  }