r1.setStringVal(new Text("random text"));
r1.setBufferVal(new ByteArrayOutputStream(20));
r1.setVectorVal(new ArrayList());
r1.setMapVal(new TreeMap());
FileInputStream istream = new FileInputStream(tmpfile);
RecordReader in = new RecordReader(istream, "xml");
RecRecord1 r2 = new RecRecord1();
in.read(r2);
istream.close();
assertTrue(r1.equals(r2));
} catch (IOException ex) {
ex.printStackTrace();
}