assertNotNull("beanMetaData is null", beanMetaData);
// Bootstrap meta data bridge
String canonicalObjectName = "Not important";
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
AnnotationRepositoryToMetaData repository = new AnnotationRepositoryToMetaData(SecurityDomainBean.class, beanMetaData, canonicalObjectName, classLoader);
List<MetaDataBridge<InterceptorMetaData>> interceptorBridges = new ArrayList<MetaDataBridge<InterceptorMetaData>>();
interceptorBridges.add(new InterceptorMetaDataBridge());
repository.addComponentMetaDataLoaderFactory(new InterceptorComponentMetaDataLoaderFactory(interceptorBridges));
repository.addMetaDataBridge(new BeanInterceptorMetaDataBridge());
Interceptors interceptors = (Interceptors) repository.resolveClassAnnotation(Interceptors.class);
assertNotNull(interceptors);
Class<?> expected[] = { DummyInterceptor.class };
assertArrayEquals(expected, interceptors.value());
Class<?> parameterTypes[] = { InvocationContext.class };
Method aroundInvoke = DummyInterceptor.class.getMethod("aroundInvoke", parameterTypes);
assertTrue(repository.hasAnnotation(DummyInterceptor.class, aroundInvoke, AroundInvoke.class));
assertFalse(repository.hasAnnotation(DummyInterceptor.class, aroundInvoke, PostConstruct.class));
Method postConstruct = DummyInterceptor.class.getMethod("postConstruct", parameterTypes);
assertTrue(repository.hasAnnotation(DummyInterceptor.class, postConstruct, PostConstruct.class));
Method preDestroy = DummyInterceptor.class.getMethod("preDestroy", parameterTypes);
assertTrue(repository.hasAnnotation(DummyInterceptor.class, preDestroy, PreDestroy.class));
Method beanAroundInvoke = InterceptedBean.class.getMethod("aroundInvoke", InvocationContext.class);
assertTrue(repository.hasAnnotation(beanAroundInvoke, AroundInvoke.class));
}