@Override
    public void removeSelector(final SelectorData selectorData) {
        if (springCloudCacheConfig.getEnabled()) {
            SpringCloudSelectorHandle selectorHandle = SELECTOR_CACHED.get().obtainHandle(selectorData.getId());
            ServiceInstanceCache.removeServiceInstance(selectorHandle.getServiceId());
        }
        SELECTOR_CACHED.get().removeHandle(selectorData.getId());
        UpstreamCacheManager.getInstance().removeByKey(selectorData.getId());
        RULE_CACHED.get().removeHandle(CacheKeyUtils.INST.getKey(selectorData.getId(), Constants.DEFAULT_RULE));
    }
@Test
    public void testRemoveSelector() throws NoSuchFieldException, IllegalAccessException {
        selectorData.setId("1");
        List<Upstream> upstreamList = Stream.of(3)
                .map(weight -> Upstream.builder()
                        .url("mock-" + weight)
                        .build())
                .collect(Collectors.toList());
        UpstreamCacheManager instance = UpstreamCacheManager.getInstance();
        instance.submit("1", upstreamList);
        Field field = instance.getClass().getDeclaredField("UPSTREAM_MAP");
        field.setAccessible(true);
        Map<String, List<Upstream>> map = (Map<String, List<Upstream>>) field.get(instance);
        Assertions.assertNotNull(map.get("1"));
        springCloudPluginDataHandler.removeSelector(selectorData);
        Assertions.assertNull(map.get("1"));
    }