public static void setFieldValue(Object target, Field field, Object fieldValue)
            throws IllegalArgumentException, SecurityException {
        if (target == null) {
            throw new IllegalArgumentException("target must be not null");
        }

        while (true) {
            if (!field.isAccessible()) {
                field.setAccessible(true);
            }
            try {
                field.set(target, fieldValue);
                return;
            } catch (IllegalAccessException ignore) {
                // avoid other threads executing `field.setAccessible(false)`
            }
        }
    }
@Test
    public void testSetFieldValue() throws NoSuchFieldException {
        BranchDO branchDO = new BranchDO("xid123123", 123L, 1, 2.2, new Date());
        ReflectionUtil.setFieldValue(branchDO, "xid", "xid456");
        Assertions.assertEquals("xid456", branchDO.getXid());
    }