class SetPropertyMethod extends AbstractPropertyMethod {

    @Override
    public <T extends Annotation> T getAnnotation(Class<T> type) {
        if (super.getAnnotation(type) != null) {
            reportInvalidAnnotationLocation();
        }
        return getter.getAnnotation(type);
    }

}

class SetPropertyMethodTest {

    private SetPropertyMethod setPropertyMethod;
    private SetPropertyMethod setInvalidPropertyMethod;

    @Test
    public void getAnnotation() {

        TestAnnotation annotation = setPropertyMethod.getAnnotation(TestAnnotation.class);
        assertThat(annotation, notNullValue());
    }

}