@Test
public void testGetInstanceForDifferentTypesLeadsToExecutionOfProcessBeforeAllForEachType() throws Exception {

    // GIVEN
    // WHEN
    final ClassA obj1 = factory.getInstance(ClassA.class);
    final ClassB obj2 = factory.getInstance(ClassB.class);
    // THEN
    assertNotNull(obj1);
    assertNotNull(obj2);
    final ArgumentCaptor<TestInvocation> invocationCaptor = ArgumentCaptor.forClass(TestInvocation.class);
    verify(executor, times(2)).processBeforeAll(invocationCaptor.capture());
    final List<TestInvocation> invocations = invocationCaptor.getAllValues();
    assertThat(invocations.get(0).getTestClass(), equalTo(ClassA.class));
    assertThat(invocations.get(0).getContext(), equalTo(ctx));
    assertThat(invocations.get(0).getFeatureResolver(), notNullValue());
    assertThat(invocations.get(1).getTestClass(), equalTo(ClassB.class));
    assertThat(invocations.get(1).getContext(), equalTo(ctx));
    assertThat(invocations.get(1).getFeatureResolver(), notNullValue());
    assertThat(invocations.get(0), not(equalTo(invocations.get(1))));
    verifyNoMoreInteractions(executor);
}