BasicAnnotationItem<TestAnnotation2> item2 = new BasicAnnotationItem<TestAnnotation2>(loader, annotation2);
@SuppressWarnings("unchecked")
AnnotationItem[] items = { item1, item2 };
@SuppressWarnings("unchecked")
BasicAnnotationsItem item = new BasicAnnotationsItem(loader, items);
AnnotationItem<? extends Annotation>[] result = item.getAnnotations();
assertUnorderedArrayEquals(items, result);
Annotation[] expected = { annotation1, annotation2 };
Annotation[] annotations = item.getValue();
assertUnorderedArrayEquals(expected, annotations);
assertTrue(item.isCachable());
assertTrue(item.isValid());
loader.setCachable(false);
assertFalse(item.isCachable());
assertTrue(item.isValid());
item1.invalidate();
assertFalse(item.isCachable());
assertFalse(item.isValid());
}