@Test void testAttachesCorrelationDataProvidersToUnitOfWork() throws Exception { subject.handle(mockUnitOfWork, mockInterceptorChain); verify(mockUnitOfWork).registerCorrelationDataProvider(mockProvider1); verify(mockUnitOfWork).registerCorrelationDataProvider(mockProvider2); verify(mockInterceptorChain).proceed(); }
@Override public Object handle(UnitOfWork<? extends T> unitOfWork, InterceptorChain interceptorChain) throws Exception { correlationDataProviders.forEach(unitOfWork::registerCorrelationDataProvider); return interceptorChain.proceed(); }
CorrelationDataInterceptor implements MessageHandlerInterceptor<T> { @Override public Object handle(UnitOfWork<? extends T> unitOfWork, InterceptorChain interceptorChain) throws Exception { correlationDataProviders.forEach(unitOfWork::registerCorrelationDataProvider); return interceptorChain.proceed(); } }
CorrelationDataInterceptor implements MessageHandlerInterceptor<T> { @Override public Object handle(UnitOfWork<? extends T> unitOfWork, InterceptorChain interceptorChain) throws Exception { correlationDataProviders.forEach(unitOfWork::registerCorrelationDataProvider); return interceptorChain.proceed(); } CorrelationDataInterceptor(CorrelationDataProvider... correlationDataProviders);  CorrelationDataInterceptor(Collection<CorrelationDataProvider> correlationDataProviders); }
CorrelationDataInterceptor implements MessageHandlerInterceptor<T> { @Override public Object handle(UnitOfWork<? extends T> unitOfWork, InterceptorChain interceptorChain) throws Exception { correlationDataProviders.forEach(unitOfWork::registerCorrelationDataProvider); return interceptorChain.proceed(); } CorrelationDataInterceptor(CorrelationDataProvider... correlationDataProviders);  CorrelationDataInterceptor(Collection<CorrelationDataProvider> correlationDataProviders); @Override Object handle(UnitOfWork<? extends T> unitOfWork, InterceptorChain interceptorChain); }
CorrelationDataInterceptor implements MessageHandlerInterceptor<T> { @Override public Object handle(UnitOfWork<? extends T> unitOfWork, InterceptorChain interceptorChain) throws Exception { correlationDataProviders.forEach(unitOfWork::registerCorrelationDataProvider); return interceptorChain.proceed(); } CorrelationDataInterceptor(CorrelationDataProvider... correlationDataProviders);  CorrelationDataInterceptor(Collection<CorrelationDataProvider> correlationDataProviders); @Override Object handle(UnitOfWork<? extends T> unitOfWork, InterceptorChain interceptorChain);  }