}
@Theory
public void testRenderRating(BinaryFormat format) {
long ts = format.hasTimestamps() ? 34208L : -1;
Rating r = Ratings.make(42L, 39L, Math.PI, ts);
ByteBuffer buf = ByteBuffer.allocate(format.getRatingSize());
format.renderRating(r, buf);
buf.flip();
buf.mark();
MutableRating r2 = new MutableRating();
format.readRating(buf, r2);
assertThat(r2, equalTo(r));
buf.reset();
Rating r3 = format.readRating(buf);
assertThat(r3, equalTo(r));
}