public static String parseToString(Map<String, String> attributes) {
        if (attributes == null || attributes.size() == 0) {
            return "";
        }

        List<String> kvs = new ArrayList<>();
        for (Map.Entry<String, String> entry : attributes.entrySet()) {

            String value = entry.getValue();
            if (Strings.isNullOrEmpty(value)) {
                kvs.add(entry.getKey());
            } else {
                kvs.add(entry.getKey() + ATTR_KEY_VALUE_EQUAL_SIGN + entry.getValue());
            }
        }
        return String.join(ATTR_ARRAY_SEPARATOR_COMMA, kvs);
    }
@Test
    public void testParseToString() {
        Assert.assertEquals("", AttributeParser.parseToString(null));
        Assert.assertEquals("", AttributeParser.parseToString(newHashMap()));
        HashMap<String, String> map = new HashMap<>();
        int addSize = 10;
        for (int i = 0; i < addSize; i++) {
            map.put("+add.key" + i, "value" + i);
        }
        int deleteSize = 10;
        for (int i = 0; i < deleteSize; i++) {
            map.put("-delete.key" + i, "");
        }
        Assert.assertEquals(addSize + deleteSize, AttributeParser.parseToString(map).split(",").length);
    }