@Test
public void shouldNotFireEventForDirectComponentIfCorrespondingDirectAdapterDoesNotExist() throws Exception {

    doReturn(new HashSet<Bean<Object>>(asList(
            TestBean.of(OtherTestDirectAdapter.class),
            TestBean.of(TestDirectQueryApiHandler.class))))
            .when(beanManager).getBeans(any(), any());
    doReturn(new HashSet<Bean<Object>>(asList(TestBean.of(OtherTestDirectAdapter.class))))
            .when(beanManager).getBeans(SynchronousDirectAdapter.class);
    serviceComponentScanner.afterDeploymentValidation(NOT_USED_AFTER_DEPLOYMENT_VALIDATION, beanManager);
    verify(beanManager, never()).fireEvent(any());
}