@Test
public void runnableWithTwoWrappersRunsThroughFirstWrapperFirst() throws Exception {

    Runnable r = new NullRunnable();
    final Flag f1 = new Flag();
    final Flag f2 = new Flag();
    ServiceWrapper wrapper1 = new NullWrapper() {
        @Override
        public void invoke(Runnable r) throws Exception {
            f1.set = true;
        }
    };
    ServiceWrapper wrapper2 = new NullWrapper() {
        @Override
        public void invoke(Runnable r) throws Exception {
            f2.set = false;
        }
    };
    impl = new ServiceWrapperChain(Arrays.asList(wrapper1, wrapper2));
    impl.invoke(r);
    assertTrue(f1.set);
    assertFalse(f2.set);
}