### Question:
ReflectionUtils { public static AnnotatedElement getAnnotatedElement(Class<?> beanClass, String propertyName, Class<?> propertyClass) { Field field = getFieldOrNull(beanClass, propertyName); Method method = getGetterOrNull(beanClass, propertyName, propertyClass); if (field == null || field.getAnnotations().length == 0) { return (method != null && method.getAnnotations().length > 0) ? method : EMPTY; } else if (method == null || method.getAnnotations().length == 0) { return field; } else { return new Annotations(field, method); } } private  ReflectionUtils(); static AnnotatedElement getAnnotatedElement(Class<?> beanClass, String propertyName, Class<?> propertyClass); @Nullable static Field getFieldOrNull(Class<?> beanClass, String propertyName); @Nullable static Method getGetterOrNull(Class<?> beanClass, String name); @Nullable static Method getGetterOrNull(Class<?> beanClass, String name, Class<?> type); static int getTypeParameterCount(java.lang.reflect.Type type); static Class<?> getTypeParameterAsClass(java.lang.reflect.Type type, int index); @Nullable static Type getTypeParameter(java.lang.reflect.Type type, int index); static Set<Class<?>> getSuperClasses(Class<?> cl); static Set<Field> getFields(Class<?> cl); static Set<Class<?>> getImplementedInterfaces(Class<?> cl);  }### Answer:
@Test public void getAnnotatedElement() { AnnotatedElement annotatedElement = ReflectionUtils.getAnnotatedElement(ReflectionUtilsTest.class, "property", String.class); assertNotNull(annotatedElement.getAnnotation(Nullable.class)); }