assertEquals(inter3, head.getNext().getNext());
}
public void testInsertAtEnd() throws Exception {
MockChain chain = new MockChain(new Operation<Type>("foo", null, null, null));
Interceptor inter2 = new MockInterceptor();
Interceptor inter1 = new MockInterceptor();
chain.addInterceptor(0, inter1);
chain.addInterceptor(1, inter2);
Interceptor head = chain.getHeadInterceptor();
assertEquals(inter1, head);
assertEquals(inter2, head.getNext());
assertEquals(inter2, chain.getTailInterceptor());
}