### Question:
ReflectionUtils { @SuppressWarnings("unchecked") public static <T> Optional<T> get(Field field, Object obj) { try { T value = (T) field.get(obj); return Optional.ofNullable(value); } catch (Exception e) { 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 testGet() throws NoSuchFieldException { HelperClass obj = new HelperClass(); Field field = HelperClass.class.getDeclaredField(ACCESSIBLE); boolean accessible = true; obj.setAccessible(accessible); assertThat(obj.getAccessible()).isEqualTo(accessible); assertThat(ReflectionUtils.get(field, obj)).hasValue(accessible); }
@Test public void testGetInaccessible() throws NoSuchFieldException { HelperClass obj = new HelperClass(); Field field = HelperClass.class.getDeclaredField(INACCESSIBLE); boolean inaccessible = true; obj.setInaccessible(inaccessible); assertThat(obj.getInaccessible()).isEqualTo(inaccessible); assertThat(ReflectionUtils.get(field, obj)).isEmpty(); }