" hash='552da749930852c69ae5d2141d3766b1'\n" +
" date='1969-07-21T02:56:15Z'>\n" +
" <desc>This is a test. If this were a real file...</desc>\n" +
" </file>";
SIFileTransferOffer fileTransfer = unmarshal(xml, SIFileTransferOffer.class);
Assert.assertNotNull(fileTransfer);
Assert.assertEquals(fileTransfer.getName(), "test.txt");
Assert.assertEquals(fileTransfer.getSize(), 1022);
Assert.assertEquals(fileTransfer.getHashes().size(), 1);
Assert.assertEquals(fileTransfer.getHashes().get(0).getAlgorithm(), "md5");
Assert.assertEquals(new BigInteger(1, fileTransfer.getHashes().get(0).getValue()).toString(16), "552da749930852c69ae5d2141d3766b1");
Assert.assertNotNull(fileTransfer.getDate());
Assert.assertEquals(fileTransfer.getDescription(), "This is a test. If this were a real file...");
}