@Test
public void testQuery() {

    URI uri = new UriBuilder(scheme, host).path(path).query(query).build();
    assertEquals(rawQuery, uri.getRawQuery());
    Map<String, String> tmp = UriBuilder.getQueryMap(uri);
    assertNotNull(tmp);
    assertEquals(query.size(), tmp.size());
    for (Entry<String, String> o : tmp.entrySet()) {
        assertTrue(query.containsKey(o.getKey()));
        assertEquals(o.getValue(), query.get(o.getKey()));
    }
}