### Question:
ReflectionUtils { public static <T extends Annotation> Optional<T> getAnnotationIfPresent( AnnotatedElement annotatedElement, Class<T> annotationClass) { if (annotatedElement.isAnnotationPresent(annotationClass)) { T annotation = annotatedElement.getAnnotation(annotationClass); return Optional.of(annotation); } return Optional.empty(); }  static MakeAccessible<A> accessible(A accessibleObject); @SuppressWarnings("unchecked") static Optional<T> get(Field field, Object obj); static Optional<T> getAnnotationIfPresent(
		AnnotatedElement annotatedElement, Class<T> annotationClass); static Optional<T> getDefaultValue(Class<? extends Annotation> annotation,
		String property); static boolean isBooleanField(Field field);  }### Answer:
@Test public void testGetAnnotationIfPresent() throws NoSuchFieldException { Field annotated = HelperClass.class.getDeclaredField(ANNOTATED); Field notAnnotated = HelperClass.class.getDeclaredField(NOT_ANNOTATED); assertThat(ReflectionUtils.getAnnotationIfPresent(annotated, Deprecated.class)).isPresent(); assertThat(ReflectionUtils.getAnnotationIfPresent(notAnnotated, Deprecated.class)) .isEmpty(); }