public static GlobalLockConfig setAndReturnPrevious(GlobalLockConfig config) {
        GlobalLockConfig previous = holder.get();
        holder.set(config);
        return previous;
    }
@Test
    void setAndReturnPrevious() {
        GlobalLockConfig config1 = new GlobalLockConfig();
        assertNull(GlobalLockConfigHolder.setAndReturnPrevious(config1), "should return null");
        assertSame(config1, GlobalLockConfigHolder.getCurrentGlobalLockConfig(), "holder fail to store config");

        GlobalLockConfig config2 = new GlobalLockConfig();
        assertSame(config1, GlobalLockConfigHolder.setAndReturnPrevious(config2), "fail to get previous config");
        assertSame(config2, GlobalLockConfigHolder.getCurrentGlobalLockConfig(), "holder fail to store latest config");
    }