byte[] recordBytes;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
LittleEndianOutputStream out = new LittleEndianOutputStream(baos);
// With nothing set
ref.serialize(out);
recordBytes = baos.toByteArray();
assertEquals(recordBytes.length, data.length);
for (int i = 0; i < data.length; i++) {
assertEquals("At offset " + i, 0, recordBytes[i]);
}