@Test
public void testQuery02() {

    Map<String, Object> map = new LinkedHashMap<String, Object>();
    map.put("name", "Ichiro Suzuki");
    map.put("ja", "すずき いちろう");
    map.put("arr", new Object[] { "xxx", "yyy" });
    String query = Functions.query(map);
    // Spec has been changed between 5.0.0 and 5.0.1
    // 5.0.0 ... arr=xxx,yyy
    // 5.0.1 ... arr[0]=xxx&arr[1]=yyy
    // Either can be populated as { "xxx", "yyy" }
    assertThat(query, is(
            "name=Ichiro%20Suzuki&ja=%E3%81%99%E3%81%9A%E3%81%8D%20%E3%81%84%E3%81%A1%E3%82%8D%E3%81%86&arr%5B0%5D=xxx&arr%5B1%5D=yyy"));
    assertThat(Functions.query(new LinkedHashMap<String, Object>()), is(
            ""));
}