/**
* getAnnotations() should return cloned array
* which can be safely modified by a caller.
*/
public void testGetAnnotationsImmutable() throws Throwable {
AnnotatedElement el = getElement1();
Annotation[] an = el.getAnnotations();
assertNotNull(an);
assertEquals("number of Annotations", 1, an.length);
assertSame(TagAntn.class, an[0].annotationType());
an[0] = null;
Annotation[] an2 = el.getAnnotations();
assertNotNull(an2);
assertEquals("number of second Annotations", 1, an2.length);
assertNotNull("array is not immutable", an2[0]);
assertSame(TagAntn.class, an2[0].annotationType());
}