public static TFeMemoryRes listFeMemoryUsage(TFeMemoryReq request) throws TException {
        TAuthInfo auth = request.getAuth_info();
        UserIdentity currentUser;
        if (auth.isSetCurrent_user_ident()) {
            currentUser = UserIdentity.fromThrift(auth.getCurrent_user_ident());
        } else {
            currentUser = UserIdentity.createAnalyzedUserIdentWithIp(auth.getUser(), auth.getUser_ip());
        }

        try {
            Authorizer.checkSystemAction(currentUser, null, PrivilegeType.OPERATE);
        } catch (AccessDeniedException e) {
            throw new TException(e.getMessage(), e);
        }

        TFeMemoryRes response = new TFeMemoryRes();

        MemoryUsageTracker.MEMORY_USAGE.forEach((moduleName, module) -> {
            if (module != null) {
                module.forEach((className, memoryStat) -> {
                    TFeMemoryItem item = new TFeMemoryItem();
                    item.setModule_name(moduleName);
                    item.setClass_name(className);
                    item.setCurrent_consumption(memoryStat.getCurrentConsumption());
                    item.setPeak_consumption(memoryStat.getPeakConsumption());
                    item.setCounter_info(memoryStat.getCounterInfo());
                    response.addToItems(item);
                });
            }
        });

        return response;
    }
@Test
    public void testListFeMemoryUsage() throws TException, AccessDeniedException {
        TFeMemoryReq req = new TFeMemoryReq();
        TAuthInfo auth = new TAuthInfo();
        auth.setUser("root");
        auth.setUser_ip("127.0.0.1");
        req.setAuth_info(auth);

        AccessControlProvider accessControlProvider = Authorizer.getInstance();
        new Expectations(accessControlProvider) {
            {
                Authorizer.checkSystemAction((UserIdentity) any, (Set<Long>) any, (PrivilegeType) any);
                result = null;
                minTimes = 0;
            }
        };
        Map<String, Map<String, MemoryStat>> memoryUsage = MemoryUsageTracker.MEMORY_USAGE;
        MemoryStat memoryStat = new MemoryStat();
        memoryUsage.put("test", ImmutableMap.of("test", memoryStat));

        var res = SysFeMemoryUsage.listFeMemoryUsage(req);
        assertTrue(StringUtils.isNotEmpty(res.toString()));
    }