Assert.assertEquals(true, jsonResp.getBoolean("result"));
}
@Test
public void testMap() throws Exception {
JSONObject jsonRequest = new JSONObject(
"{ \"method\": \"echoMap\", \"params\": [ {\"javaClass\": \"java.util.HashMap\", \"map\": { \"Binding\": \"JSON-RPC\"}}], \"id\": 6}");
WebConversation wc = new WebConversation();
WebRequest request = new PostMethodWebRequest(SERVICE_URL,
new ByteArrayInputStream(jsonRequest.toString().getBytes("UTF-8")), "application/json");
WebResponse response = wc.getResource(request);
Assert.assertEquals(200, response.getResponseCode());
JSONObject jsonResp = new JSONObject(response.getText());
Assert.assertEquals("JSON-RPC", jsonResp.getJSONObject("result").getJSONObject("map").getString("Binding"));
}