### Question:
BufferUtils { public static void writeMap(final Buffer buffer, final MultiMap<String, String> params) { buffer.appendShort((short) params.size()); final Set<String> keys = params.keySet(); for (String key : keys) { writeString(buffer, key); final Collection<String> values = (Collection<String>) params.getAll(key); buffer.appendShort((short) values.size()); for (String value : values) { writeString(buffer, value); } } }  static void writeString(final Buffer buffer, final String value); static void writeMap(final Buffer buffer, final MultiMap<String, String> params); static String readString(final Buffer buffer, final int[] location); static MultiMap<String, String> readMap(Buffer buffer, int[] locationHolder);  }### Answer:
@Test public void testWriteMap() throws Exception { Buffer buffer = Buffer.buffer(); MultiMap<String, String> map = new MultiMapImpl<>(); map.put("key", "value"); BufferUtils.writeMap(buffer, map); int[] location = new int[]{0}; MultiMap<String, String> map2 = BufferUtils.readMap(buffer, location); final String value = map2.get("key"); ok = value.equals("value") || die(); }