public Selector parseSelector(String type, String condition) throws NacosException {
        if (StringUtils.isBlank(type)) {
            return null;
        }
        Class<? extends Selector> clazz = selectorTypes.get(type);
        if (Objects.isNull(clazz)) {
            return null;
        }
        try {
            Selector selector = clazz.newInstance();
            selector.parse(condition);
            return selector;
        } catch (Exception e) {
            Loggers.SRV_LOG.warn("[SelectorManager] Parse Selector failed, type: {}, condition: {}.", type, condition, e);
            throw new NacosException(SERVER_ERROR, "Selector parses failed: " + e.getMessage());
        }
    }
@Test
    void testParseSelector() throws NacosException {
        Selector selector = selectorManager.parseSelector("mock", "key=value");
        assertTrue(selector instanceof MockSelector);
        
        assertEquals("mock", selector.getType());
    }