@Test
public void testSingleEvent() throws Exception {

  String json = "[{\"headers\" : {\"a\": \"b\"},\"body\": \"random_body\"}]";
  HttpServletRequest req = new FlumeHttpServletRequestWrapper(json);
  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"));
}