public static MemberLookup switchLookup(String name, ServerMemberManager memberManager) throws NacosException {
        LookupType lookupType = LookupType.sourceOf(name);
        
        if (Objects.isNull(lookupType)) {
            throw new IllegalArgumentException(
                    "The addressing mode exists : " + name + ", just support : [" + Arrays.toString(LookupType.values())
                            + "]");
        }
        
        if (Objects.equals(currentLookupType, lookupType)) {
            return LOOK_UP;
        }
        MemberLookup newLookup = find(lookupType);
        currentLookupType = lookupType;
        if (Objects.nonNull(LOOK_UP)) {
            LOOK_UP.destroy();
        }
        LOOK_UP = newLookup;
        LOOK_UP.injectMemberManager(memberManager);
        Loggers.CLUSTER.info("Current addressing mode selection : {}", LOOK_UP.getClass().getSimpleName());
        return LOOK_UP;
    }
@Test
    void testSwitchLookup() throws Exception {
        EnvUtil.setIsStandalone(false);
        createLookUpFileConfigMemberLookup();
        EnvUtil.setIsStandalone(false);
        String name1 = "file";
        MemberLookup memberLookup = LookupFactory.switchLookup(name1, memberManager);
        assertEquals(FileConfigMemberLookup.class, memberLookup.getClass());
        
        createLookUpAddressServerMemberLookup();
        String name2 = "address-server";
        memberLookup = LookupFactory.switchLookup(name2, memberManager);
        assertEquals(AddressServerMemberLookup.class, memberLookup.getClass());
        
        createLookUpStandaloneMemberLookup();
        String name3 = "address-server";
        memberLookup = LookupFactory.switchLookup(name3, memberManager);
        assertEquals(StandaloneMemberLookup.class, memberLookup.getClass());
    }