### Question:
UtilReflection { public static void setAccessible(AccessibleObject object, boolean accessible) { Check.notNull(object); if (object.isAccessible() != accessible) { java.security.AccessController.doPrivileged((PrivilegedAction<Void>) () -> { object.setAccessible(accessible); return null; }); } } private  UtilReflection(); static T create(Class<T> type, Class<?>[] paramTypes, Object... params); @SuppressWarnings("unchecked") static T createReduce(Class<T> type, Object... params); static Class<?>[] getParamTypes(Object... arguments); @SuppressWarnings("unchecked") static Constructor<T> getCompatibleConstructor(Class<T> type, Class<?>... paramTypes); @SuppressWarnings("unchecked") static Constructor<T> getCompatibleConstructorParent(Class<T> type, Class<?>[] paramTypes); static T getMethod(Object object, String name, Object... params); static T getField(Object object, String name); static void setAccessible(AccessibleObject object, boolean accessible); static Collection<Class<?>> getInterfaces(Class<?> object, Class<?> base);  }### Answer:
@Test void testSetAccessible() { final AccessibleObject accessible = AccessibleTest.class.getDeclaredFields()[0]; assertFalse(accessible.isAccessible()); UtilReflection.setAccessible(accessible, true); assertTrue(accessible.isAccessible()); UtilReflection.setAccessible(accessible, false); assertFalse(accessible.isAccessible()); UtilReflection.setAccessible(accessible, false); assertFalse(accessible.isAccessible()); }