}
}
@Test
public void testReadWrite() throws IOException {
NBitSignature s = getRandomSignature();
NBitSignature s2 = getRandomSignature();
FileSystem fs;
SequenceFile.Writer w;
Configuration conf = new Configuration();
fs = FileSystem.get(conf);
w = SequenceFile.createWriter(fs, conf, new Path(TMP_FILENAME1),
IntWritable.class, NBitSignature.class);
w.append(new IntWritable(1), s);
w.append(new IntWritable(2), s2);
w.close();
List<PairOfWritables<WritableComparable, Writable>> listOfKeysPairs =
SequenceFileUtils.readFile(new Path(TMP_FILENAME1));
fs.delete(new Path(TMP_FILENAME1), true);
NBitSignature read1 = (NBitSignature) listOfKeysPairs.get(0).getRightElement();
NBitSignature read2 = (NBitSignature) listOfKeysPairs.get(1).getRightElement();
assertTrue(read1.toString().equals(s.toString()));
assertTrue(read2.toString().equals(s2.toString()));
// System.out.println(read1.toString());
// System.out.println(read2.toString());
}