* Tests the serialization/deserialization of the {@link FileRecord} class.
*/
@Test
public void testFileRecord() {
final FileRecord orig = new FileRecord("Test Filename");
final byte[] data = new byte[128];
orig.append(data, 0, data.length);
orig.append(data, 0, data.length);
assertEquals(orig.getDataBuffer().length, 2 * data.length);
try {
final FileRecord copy = (FileRecord) CommonTestUtils.createCopyWritable(orig);
assertEquals(orig.getFileName(), copy.getFileName());
assertEquals(orig, copy);
assertEquals(orig.hashCode(), copy.hashCode());
} catch (IOException ioe) {
fail(ioe.getMessage());
}