use of com.pushtorefresh.storio3.operations.PreparedOperation in project storio by pushtorefresh.
the class ChainImplTest method buildChain_placesRealInterceptorAfterRegistered.
@Test
public void buildChain_placesRealInterceptorAfterRegistered() {
Interceptor registered1 = spy(new IntermediateInterceptor());
Interceptor registered2 = spy(new IntermediateInterceptor());
final List<Interceptor> interceptors = Arrays.asList(registered1, registered2);
Interceptor real = mock(Interceptor.class);
final Chain chain = ChainImpl.buildChain(interceptors, real);
InOrder inOrder = Mockito.inOrder(registered1, registered2, real);
PreparedOperation operation = mock(PreparedOperation.class);
chain.proceed(operation);
inOrder.verify(registered1).intercept(eq(operation), any(Chain.class));
inOrder.verify(registered2).intercept(eq(operation), any(Chain.class));
inOrder.verify(real).intercept(eq(operation), any(Chain.class));
}
Aggregations