ProtocolEncoderOutput out = session.getEncoderOutput();
encoder.encode(session, "ABC", out);
Assert.assertEquals(1, session.getEncoderOutputQueue().size());
IoBuffer buf = (IoBuffer) session.getEncoderOutputQueue().poll();
Assert.assertEquals(5, buf.remaining());
Assert.assertEquals('A', buf.get());
Assert.assertEquals('B', buf.get());
Assert.assertEquals('C', buf.get());
Assert.assertEquals('\r', buf.get());
Assert.assertEquals('\n', buf.get());