@Test void testDispatchInterceptorLogging() { when(mockLogger.isInfoEnabled()).thenReturn(true); testSubject.handle(new GenericMessage<Object>(new StubMessage())); verify(mockLogger).logIfEnabled(anyString(), eq(Level.INFO), isNull(), anyString(), contains("StubMessage")); verifyNoMoreInteractions(mockLogger); }
@Override public BiFunction<Integer, T, T> handle(List<? extends T> messages) { return (i, message) -> { logger.info("Dispatched messages: [{}]", message.getPayloadType().getSimpleName()); return message; }; }
LoggingInterceptor implements MessageDispatchInterceptor<T>, MessageHandlerInterceptor<T> { @Override public BiFunction<Integer, T, T> handle(List<? extends T> messages) { return (i, message) -> { logger.info("Dispatched messages: [{}]", message.getPayloadType().getSimpleName()); return message; }; } }
LoggingInterceptor implements MessageDispatchInterceptor<T>, MessageHandlerInterceptor<T> { @Override public BiFunction<Integer, T, T> handle(List<? extends T> messages) { return (i, message) -> { logger.info("Dispatched messages: [{}]", message.getPayloadType().getSimpleName()); return message; }; } LoggingInterceptor(String loggerName);  LoggingInterceptor(); }
LoggingInterceptor implements MessageDispatchInterceptor<T>, MessageHandlerInterceptor<T> { @Override public BiFunction<Integer, T, T> handle(List<? extends T> messages) { return (i, message) -> { logger.info("Dispatched messages: [{}]", message.getPayloadType().getSimpleName()); return message; }; } LoggingInterceptor(String loggerName);  LoggingInterceptor(); @Override BiFunction<Integer, T, T> handle(List<? extends T> messages); @Override Object handle(UnitOfWork<? extends T> unitOfWork, InterceptorChain interceptorChain); }
LoggingInterceptor implements MessageDispatchInterceptor<T>, MessageHandlerInterceptor<T> { @Override public BiFunction<Integer, T, T> handle(List<? extends T> messages) { return (i, message) -> { logger.info("Dispatched messages: [{}]", message.getPayloadType().getSimpleName()); return message; }; } LoggingInterceptor(String loggerName);  LoggingInterceptor(); @Override BiFunction<Integer, T, T> handle(List<? extends T> messages); @Override Object handle(UnitOfWork<? extends T> unitOfWork, InterceptorChain interceptorChain);  }