final ByteArrayOutputStream outstream = new ByteArrayOutputStream();
final WritableByteChannel channel = Channels.newChannel(outstream);
final SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, Consts.ASCII);
final HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
final ContentEncoder encoder = new ContentEncoderMock(channel, outbuf, metrics);
final SimpleOutputBuffer buffer = new SimpleOutputBuffer(4, DirectByteBufferAllocator.INSTANCE);
buffer.write(EncodingUtils.getAsciiBytes("stuff"));
buffer.write(';');