### Question:
ReflectionUtil { public static void modifyStaticFinalField(Class cla, String modifyFieldName, Object newValue) throws NoSuchFieldException, IllegalAccessException { Field field = cla.getDeclaredField(modifyFieldName); field.setAccessible(true); Field modifiers = field.getClass().getDeclaredField("modifiers"); modifiers.setAccessible(true); modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL); field.set(cla, newValue); }  static Class<?> getClassByName(String className); static Object getFieldValue(Object target, String fieldName); static Object invokeMethod(Object target, String methodName); static Object invokeMethod(Object target, String methodName, Class<?>[] parameterTypes, Object[] args); static Object invokeStaticMethod(Class<?> targetClass, String methodName, Class<?>[] parameterTypes,
                                            Object[] parameterValues); static Method getMethod(Class<?> classType, String methodName, Class<?>[] parameterTypes); static Set<Class<?>> getInterfaces(Class<?> clazz); static void modifyStaticFinalField(Class cla, String modifyFieldName, Object newValue); static final int MAX_NEST_DEPTH; }### Answer:
@Test public void testModifyStaticFinalField() throws NoSuchFieldException, IllegalAccessException { Assertions.assertEquals("hello", testValue); ReflectionUtil.modifyStaticFinalField(ReflectionUtilTest.class, "testValue", "hello world"); Assertions.assertEquals("hello world", testValue); }