@Test
public void doublePost() throws IOException, InstanceNotFoundException, ReflectionException, AttributeNotFoundException, MBeanException {

    JSONObject resp = new JSONObject();
    expect(backend.handleRequest(isA(JmxReadRequest.class))).andReturn(resp).times(2);
    replay(backend);
    InputStream is = HttpTestUtil.createServletInputStream("[" + HttpTestUtil.HEAP_MEMORY_POST_REQUEST + "," + HttpTestUtil.HEAP_MEMORY_POST_REQUEST + "]");
    JSONArray response = (JSONArray) handler.handlePostRequest("/jolokia", is, "utf-8", null);
    assertEquals(response.size(),2);
    assertTrue(response.get(0) == resp);
    assertTrue(response.get(1) == resp);
}