@GetMapping("/{id}/{namespaceId}")
    public ShenyuAdminResult detailSelector(@PathVariable("id") @Valid
                                            @Existed(provider = SelectorMapper.class, message = "selector is not existed") final String id,
                                            @PathVariable("namespaceId") @Valid
                                            @Existed(provider = NamespaceMapper.class, message = "namespaceId is not existed") final String namespaceId) {
        SelectorVO selectorVO = selectorService.findByIdAndNamespaceId(id, namespaceId);
        return ShenyuAdminResult.success(ShenyuResultMessage.DETAIL_SUCCESS, selectorVO);
    }
@Test
    public void detailSelector() throws Exception {
        SpringBeanUtils.getInstance().setApplicationContext(mock(ConfigurableApplicationContext.class));

        when(SpringBeanUtils.getInstance().getBean(NamespaceMapper.class)).thenReturn(namespaceMapper);
        when(namespaceMapper.existed(SYS_DEFAULT_NAMESPACE_ID)).thenReturn(true);
        given(this.selectorService.findByIdAndNamespaceId("1", SYS_DEFAULT_NAMESPACE_ID)).willReturn(selectorVO);

        this.mockMvc.perform(MockMvcRequestBuilders.get("/selector/{id}/{namespaceId}", "1", SYS_DEFAULT_NAMESPACE_ID))
                .andExpect(status().isOk())
                .andExpect(jsonPath("$.message", is(ShenyuResultMessage.DETAIL_SUCCESS)))
                .andExpect(jsonPath("$.data.id", is(selectorVO.getId())))
                .andReturn();
    }