class AssetGroupUtil {

    @SuppressWarnings("unchecked")
    public static List<Map<String, Object>> fetchComplianceInfo(String apiUrl, String ag, List<String> domains ,String token) throws Exception {
        List<Map<String, Object>> compInfo = new ArrayList<>();
        try {
            for (String domain : domains) {
                String typeCountJson = HttpUtil
                        .get(apiUrl + "/overallcompliance?ag=" + ag + "&domain=" + Util.encodeUrl(domain),token);
                Map<String, Object> complianceMap = Util.parseJson(typeCountJson);
                Map<String, Map<String, Object>> data = (Map<String, Map<String, Object>>) complianceMap.get("data");
                Map<String, Object> complianceStats = data.get(DISTRIBUTION);
                if (complianceStats != null) {
                    complianceStats.put(DOMAIN, domain);
                    compInfo.add(complianceStats);
                }
            }
        } catch (Exception e) {
            LOGGER.error("Error in fetchComplianceInfo" , e);
            throw e;
        }
        return compInfo;
    }

    private  AssetGroupUtil();

}