public static String asString_ApiGatewayBeans(Set<ApiGatewayBean> gateways) {
        TreeSet<ApiGatewayBean> sortedGateways = new TreeSet<>(new Comparator<ApiGatewayBean>() {
            @Override
            public int compare(ApiGatewayBean o1, ApiGatewayBean o2) {
                return o1.getGatewayId().compareTo(o2.getGatewayId());
            }
        });
        sortedGateways.addAll(gateways);

        StringBuilder builder = new StringBuilder();
        boolean first = true;
        if (gateways != null) {
            for (ApiGatewayBean gateway : sortedGateways) {
                if (!first) {
                    builder.append(", "); //$NON-NLS-1$
                }
                builder.append(gateway.getGatewayId());
                first = false;
            }
        }
        return builder.toString();
    }
Converts the list of gateways to a string for display/comparison.
@param gateways set of gateways
@return the gateways as a string
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/audit/AuditUtils.java