@Test
public void testMethodsWithCucumberAnnotationsAreIntercepted() throws Exception {

    // GIVEN
    final ClassB obj = factory.getInstance(ClassB.class);
    // WHEN
    obj.when();
    // THEN
    verify(executor).processBeforeAll(notNull(TestInvocation.class));
    final InOrder inOrder = inOrder(executor);
    inOrder.verify(executor).processBefore(notNull(TestInvocation.class));
    inOrder.verify(executor).processAfter(notNull(TestInvocation.class));
    verifyNoMoreInteractions(executor);
}