@Test
public void testMultipleEventsUTF8() throws Exception {

  String json = "[{\"headers\":{\"a\": \"b\"},\"body\": \"random_body\"},"
          + "{\"headers\":{\"e\": \"f\"},\"body\": \"random_body2\"}]";
  HttpServletRequest req = new FlumeHttpServletRequestWrapper(json, "UTF-8");
  List<Event> deserialized = handler.getEvents(req);
  Event e = deserialized.get(0);
  Assert.assertEquals("b", e.getHeaders().get("a"));
  Assert.assertEquals("random_body", new String(e.getBody(), "UTF-8"));
  e = deserialized.get(1);
  Assert.assertEquals("f", e.getHeaders().get("e"));
  Assert.assertEquals("random_body2", new String(e.getBody(), "UTF-8"));
}