content: package com.alibaba.fastjson.issue_2100;
  
  import com.alibaba.fastjson.JSON;
  import com.google.common.collect.ArrayListMultimap;
  import com.google.common.collect.Multimap;
  import org.junit.jupiter.api.Test;
  import org.skyscreamer.jsonassert.JSONAssert;
  
  import static org.junit.jupiter.api.Assertions.assertEquals;
  
  public class Issue2182 {
      @Test
      public void test_for_issue() throws Exception {
          Multimap<String, String> multimap = ArrayListMultimap.create();
          multimap.put("admin", "admin.create");
          multimap.put("admin", "admin.update");
          multimap.put("admin", "admin.delete");
          multimap.put("user", "user.create");
          multimap.put("user", "user.delete");
  
          String json = JSON.toJSONString(multimap);
          JSONAssert.assertEquals("{\"admin\":[\"admin.create\",\"admin.update\",\"admin.delete\"],\"user\":[\"user.create\",\"user.delete\"]}", json, true);
  
          ArrayListMultimap multimap1 = JSON.parseObject(json, ArrayListMultimap.class);
  
          assertEquals(multimap.size(), multimap1.size());
          JSONAssert.assertEquals(json, JSON.toJSONString(multimap1), true);
      }
  }
  