class AssetGroupUtil {

    @SuppressWarnings("unchecked")
    public static List<Map<String, Object>> fetchTypeCounts(String asstApiUri, String ag,String token) throws Exception {

        String typeCountJson = HttpUtil.get(asstApiUri + "/count?ag=" + ag,token);
        Map<String, Object> typeCountMap = Util.parseJson(typeCountJson);
        List<Map<String, Object>> typeCounts = new ArrayList<>();
        try {
            typeCounts = (List<Map<String, Object>>) ((Map<String, Object>) typeCountMap.get("data")).get("assetcount");
        } catch (Exception e) {
            LOGGER.error("Error in fetchTypeCounts",e);
            throw e;
        }
        return typeCounts;
    }

    private  AssetGroupUtil();

}