*/
public void testMethodLevelAnnotationsWithMethodSignature() throws Exception
{
AnnotatedElementMetaDataLoader annotatedElementLoader = new AnnotatedElementMetaDataLoader(MethodBean.class);
// Create a MethodSignature for the method with 1 annotation
MethodSignature methodSignature = new MethodSignature("testAnnotation", String.class);
// create a retrieval out of it
MetaDataRetrieval retrieval = annotatedElementLoader.getComponentMetaDataRetrieval(methodSignature);
MetaData metadata = new MetaDataRetrievalToMetaDataBridge(retrieval);
// should be empty array since the bean has no annotations
Annotation[] annotations = metadata.getAnnotations();
assertTrue("Expected one annotation on testAnnotation method of " + MethodBean.class, annotations.length == 1);
// Now try the same on a method which has 2 annotations
MethodSignature anotherMethodSignature = new MethodSignature("testAnnotation12", String.class, Class.class);
// create a retrieval out of it
MetaDataRetrieval anotherRetrieval = annotatedElementLoader.getComponentMetaDataRetrieval(anotherMethodSignature);
MetaData anotherMetadata = new MetaDataRetrievalToMetaDataBridge(anotherRetrieval);
// should be empty array since the bean has no annotations
Annotation[] annotationsOnMethodWithTwoAnnotations = anotherMetadata.getAnnotations();