public void testAppendParameters() throws Exception { Map<String, Object> params = new LinkedHashMap<String, Object>(); params.put("foo", 123); params.put("bar", "yes"); // should clear the map after usage assertEquals( "http://localhost:8080/data?foo=123&bar=yes", ResourceHelper.appendParameters("http://localhost:8080/data", params)); assertEquals(0, params.size()); }