@Override
    public String register(final MetaDataRegisterDTO dto) {
        //handler plugin selector
        String selectorHandler = selectorHandler(dto);
        String selectorId = selectorService.registerDefault(dto, PluginNameAdapter.rpcTypeAdapter(rpcType()), selectorHandler);
        //handler selector rule
        String ruleHandler = ruleHandler();
        RuleDTO ruleDTO = buildRpcDefaultRuleDTO(selectorId, dto, ruleHandler);
        ruleService.registerDefault(ruleDTO);
        //handler register metadata
        registerMetadata(dto);
        //handler context path
        String contextPath = dto.getContextPath();
        if (StringUtils.isNotEmpty(contextPath)) {
            registerContextPath(dto);
        }
        return ShenyuResultMessage.SUCCESS;
    }
@Test
    public void testRegister() {
        MetaDataRegisterDTO dto = MetaDataRegisterDTO.builder().build();
        dto.setContextPath("Context_Path");
        dto.setPath("Path");
        when(selectorService.registerDefault(any(), any(), any())).thenReturn("SELECTOR_ID");
        assertEquals(ShenyuResultMessage.SUCCESS, abstractShenyuClientRegisterService.register(dto));

        dto.setPath("Path/");
        assertEquals(ShenyuResultMessage.SUCCESS, abstractShenyuClientRegisterService.register(dto));

        dto.setPath("Path/**");
        assertEquals(ShenyuResultMessage.SUCCESS, abstractShenyuClientRegisterService.register(dto));

        dto.setPath("Path/*{id}");
        assertEquals(ShenyuResultMessage.SUCCESS, abstractShenyuClientRegisterService.register(dto));
    }