class Util {

    public static boolean isValidAssetGroup(String ag) {
        List<Map<String, Object>> agList = assetService.getAllAssetGroups();
        return agList.stream().filter(obj -> ag.equals(obj.get("name"))).count() > 0 ? true : false;
    }

}