@GetMapping(value = "/configs")
    @Secured(action = ActionTypes.READ, signType = SignType.CONFIG)
    public Result<List<ConfigInfoWrapper>> getConfigsByTenant(@RequestParam("namespaceId") String namespaceId)
            throws NacosApiException {
        // check namespaceId
        ParamUtils.checkTenantV2(namespaceId);
        namespaceId = NamespaceUtil.processNamespaceParameter(namespaceId);
        return Result.success(historyService.getConfigListByNamespace(namespaceId));
    }
@Test
    void testGetConfigListByNamespace() throws NacosApiException {
        ConfigInfoWrapper configInfoWrapper = new ConfigInfoWrapper();
        configInfoWrapper.setDataId("test");
        configInfoWrapper.setGroup("test");
        configInfoWrapper.setContent("test");
        List<ConfigInfoWrapper> configInfoWrappers = Collections.singletonList(configInfoWrapper);
        
        when(historyService.getConfigListByNamespace("test")).thenReturn(configInfoWrappers);
        Result<List<ConfigInfoWrapper>> result = historyControllerV2.getConfigsByTenant("test");
        verify(historyService).getConfigListByNamespace("test");
        
        assertEquals(ErrorCode.SUCCESS.getCode(), result.getCode());
        List<ConfigInfoWrapper> actualList = result.getData();
        assertEquals(configInfoWrappers.size(), actualList.size());
        ConfigInfoWrapper actualConfigInfoWrapper = actualList.get(0);
        assertEquals(configInfoWrapper.getDataId(), actualConfigInfoWrapper.getDataId());
        assertEquals(configInfoWrapper.getGroup(), actualConfigInfoWrapper.getGroup());
        assertEquals(configInfoWrapper.getContent(), actualConfigInfoWrapper.getContent());
    }