Annotation requestAnnotation = metadata.getTypeLevelAnnotation(RequestMapping.class.getName());
assertEquals(RequestMapping.class.getName(), requestAnnotation.getAnnotationClass());
Set<AnnotationMemberValuePair> requestMembers = requestAnnotation.getMembers();
assertEquals(1, requestMembers.size());
AnnotationMemberValuePair pair = requestMembers.iterator().next();
assertNull(pair.getName());
assertEquals("/index1.htm, /index2.htm", pair.getValue());
Map<IMethod, Annotation> requestMappingMethodAnnotations = metadata.getMethodLevelAnnotations(RequestMapping.class.getName());
assertEquals(1, requestMappingMethodAnnotations.size());
IMethod method = type.getMethods()[0];
Annotation requestMethodAnnotation = requestMappingMethodAnnotations.get(method);
assertEquals(RequestMapping.class.getName(), requestMethodAnnotation.getAnnotationClass());
Set<AnnotationMemberValuePair> requestMethodMembers = requestMethodAnnotation.getMembers();
assertEquals(1, requestMethodMembers.size());
pair = requestMethodMembers.iterator().next();
assertEquals("method", pair.getName());
assertEquals("RequestMethod.GET, RequestMethod.POST", pair.getValue());
}