@Override
    public void write(IApimanBuffer chunk) {
        if (this.output == null) {
            this.output = new ByteArrayOutputStream();
        }
        try {
            this.output.write(chunk.getBytes());
        } catch (IOException e) {
            // should never happen :)
        }
    }
@see io.apiman.gateway.engine.io.IWriteStream#write(io.apiman.gateway.engine.io.IApimanBuffer)
test/policies/src/main/java/io/apiman/test/policies/PolicyTesterApiConnection.java