class AssetGroupUtil {

    public static Map<String, Object> fetchVulnSummary(String compapiuri, String ag ,String token) throws Exception {
        Map<String, Object> vulnSummary = new HashMap<>();
        try {
            String vulnSummaryResponse = HttpUtil.get(compapiuri + "/vulnerabilites?ag=" + ag,token);
            JsonObject vulnSummaryJson = new JsonParser().parse(vulnSummaryResponse).getAsJsonObject();
            JsonObject vulnJsonObj = vulnSummaryJson.get("data").getAsJsonObject().get(OUTPUT).getAsJsonObject();
            long total = vulnJsonObj.get("hosts").getAsLong();
            long noncompliant = vulnJsonObj.get("totalVulnerableAssets").getAsLong();
            vulnSummary.put(TOTAL, total);
            vulnSummary.put(NON_COMPLIANT, noncompliant);
            vulnSummary.put(COMPLIANT, total - noncompliant);
        } catch (Exception e) {
            LOGGER.error("Error retrieving vuln sumamary " , e);
            throw e;
        }
        return vulnSummary;
    }

    private  AssetGroupUtil();

}