stream.flush();
stream.close();
SegmentedChromosomeData copy = new SegmentedChromosomeData();
InputStream is = new FileInputStream(testFile);
copy.deserialize(is);
is.close();
String[] expectedSamples = testData.getSampleNames();
String[] samples = copy.getSampleNames();
assertEquals(expectedSamples.length, samples.length);