[Test] make sure we test writeTo(Channel) in BytesReference
also introduce proper randomization of content in the bytes