public class MethodAnnotationTest {
@Test
public void getAnnotation() throws Exception {
Method method = Annotated.class.getMethod("method");
PrimitiveMarker annotation = method.getAnnotation(PrimitiveMarker.class);
assert annotation != null;
assert annotation instanceof Annotation;
assert annotation instanceof PrimitiveMarker;
assert annotation.intValue() == 10;
assert annotation.booleanValue();
assert annotation.doubleValue() == 3.14;
assert annotation.annotationType() == PrimitiveMarker.class;
assert annotation == method.getAnnotation(PrimitiveMarker.class);
}