### Question:
ReflectionUtils { @Nullable public static Object getDeclaredField(Object obj, String fieldName) { try { Field f = getField(obj.getClass(), fieldName); if (f == null) { return null; } f.setAccessible(true); return f.get(obj); } catch (Exception e) { e.printStackTrace(); } return null; }  static void setField(Object obj, String name, Object value); @Nullable static Object getDeclaredField(Object obj, String fieldName);  }### Answer:
@Test public void getDeclaredField() throws Exception { assertThat(ReflectionUtils.getDeclaredField(new Foo(), "bar")).isEqualTo("old value"); }