@Test
public void getAnnotationOnSetter() {

    try {
        TestAnnotation annotation = setInvalidPropertyMethod.getAnnotation(TestAnnotation.class);
        fail("Expecting " + XOException.class);
    } catch (XOException e) {
        assertThat(e.getMessage(), containsString("setInvalidProperty"));
    }
}