@Test
public void callableWithTwoWrappersRunsThroughFirstWrapperFirst() throws Exception {

    final Object out1 = new Object();
    final Object out2 = new Object();
    Callable<Object> c = new NullCallable();
    ServiceWrapper wrapper1 = new NullWrapper() {
        @SuppressWarnings("unchecked")
        @Override
        public <T> T invoke(Callable<T> c) throws Exception {
            return (T)out1;
        }
    };
    ServiceWrapper wrapper2 = new NullWrapper() {
        @SuppressWarnings("unchecked")
        @Override
        public <T> T invoke(Callable<T> c) throws Exception {
            return (T)out2;
        }
    };
    impl = new ServiceWrapperChain(Arrays.asList(wrapper1, wrapper2));
    assertSame(out1, impl.invoke(c));
}