SetPropertyMethod extends AbstractPropertyMethod { @Override public Annotation[] getAnnotations() { return getter.getAnnotations(); } SetPropertyMethod(Method setter, GetPropertyMethod getter, String name, Class<?> type, Type genericType); @Override T getAnnotation(Class<T> type); @Override T getByMetaAnnotation(Class<M> type); @Override Annotation[] getAnnotations();  }
@Test public void getAnnotations() { Annotation[] annotations = setPropertyMethod.getAnnotations(); assertThat(annotations, notNullValue()); assertThat(annotations.length, equalTo(1)); assertThat(annotations[0], instanceOf(TestAnnotation.class)); }