@Test
public void testMaxLineLength() throws IOException {

  String longLine = "abcdefghijklmnopqrstuvwxyz\n";
  Context ctx = new Context();
  ctx.put(LineDeserializer.MAXLINE_KEY, "10");
  ResettableInputStream in = new ResettableTestStringInputStream(longLine);
  EventDeserializer des = new LineDeserializer(ctx, in);
  assertEventBodyEquals("abcdefghij", des.readEvent());
  assertEventBodyEquals("klmnopqrst", des.readEvent());
  assertEventBodyEquals("uvwxyz", des.readEvent());
  Assert.assertNull(des.readEvent());
}