public void updateConfig(DynamicConfigEvent event) {
        if (!isTargetConfig(event)) {
            return;
        }
        if (updateWithDefaultMode(event)) {
            afterUpdateConfig();
        }
    }
@Test
    public void testRegistrySwitchConfig() {
        RegistryConfigResolver configResolver = new OriginRegistrySwitchConfigResolver();
        final DynamicConfigEvent event = Mockito.mock(DynamicConfigEvent.class);
        Mockito.when(event.getContent()).thenReturn("origin.__registry__.needClose: true");
        Mockito.when(event.getKey()).thenReturn("sermant.agent.registry");
        configResolver.updateConfig(event);
        final RegisterDynamicConfig config = config(configResolver, RegisterDynamicConfig.class);
        Assert.assertTrue(config.isNeedCloseOriginRegisterCenter());
    }