@Override
    public void end() {
        PolicyTestBackEndApiResponse response = backEndApi.invoke(request,
                output == null ? null : output.toByteArray());
        IApiConnectionResponse connectionResponse = new PolicyTesterApiConnectionResponse(response);
        handler.handle(AsyncResultImpl.create(connectionResponse));
        finished = true;
    }
@see io.apiman.gateway.engine.io.IWriteStream#end()
test/policies/src/main/java/io/apiman/test/policies/PolicyTesterApiConnection.java