@Test
public void testMultipleLargeEvents() throws Exception {

  String json = "[{\"headers\" : {\"a\": \"b\", \"a2\": \"b2\","
          + "\"a3\": \"b3\",\"a4\": \"b4\"},\"body\": \"random_body\"},"
          + "{\"headers\" :{\"e\": \"f\",\"e2\": \"f2\","
          + "\"e3\": \"f3\",\"e4\": \"f4\",\"e5\": \"f5\"},"
          + "\"body\": \"random_body2\"},"
          + "{\"headers\" :{\"q1\": \"b\",\"q2\": \"b2\",\"q3\": \"b3\",\"q4\": \"b4\"},"
          + "\"body\": \"random_bodyq\"}]";
  HttpServletRequest req = new FlumeHttpServletRequestWrapper(json);
  List<Event> deserialized = handler.getEvents(req);
  Event e = deserialized.get(0);
  Assert.assertNotNull(e);
  Assert.assertEquals("b", e.getHeaders().get("a"));
  Assert.assertEquals("b2", e.getHeaders().get("a2"));
  Assert.assertEquals("b3", e.getHeaders().get("a3"));
  Assert.assertEquals("b4", e.getHeaders().get("a4"));
  Assert.assertEquals("random_body", new String(e.getBody(),"UTF-8"));
  e = deserialized.get(1);
  Assert.assertNotNull(e);
  Assert.assertEquals("f", e.getHeaders().get("e"));
  Assert.assertEquals("f2", e.getHeaders().get("e2"));
  Assert.assertEquals("f3", e.getHeaders().get("e3"));
  Assert.assertEquals("f4", e.getHeaders().get("e4"));
  Assert.assertEquals("f5", e.getHeaders().get("e5"));
  Assert.assertEquals("random_body2", new String(e.getBody(),"UTF-8"));
  e = deserialized.get(2);
  Assert.assertNotNull(e);
  Assert.assertEquals("b", e.getHeaders().get("q1"));
  Assert.assertEquals("b2", e.getHeaders().get("q2"));
  Assert.assertEquals("b3", e.getHeaders().get("q3"));
  Assert.assertEquals("b4", e.getHeaders().get("q4"));
  Assert.assertEquals("random_bodyq", new String(e.getBody(),"UTF-8"));
}