public void testPKBlobsInsert() {
PkblobsDAO dao = getPkblobsDAO();
try {
PkblobsWithBLOBs record = new PkblobsWithBLOBs();
record.setId(new Integer(3));
record.setBlob1(TestUtilities.generateRandomBlob());
record.setBlob2(TestUtilities.generateRandomBlob());
dao.insert(record);
PkblobsExample example = new PkblobsExample();
List answer = dao.selectByExampleWithBLOBs(example);
assertEquals(1, answer.size());
PkblobsWithBLOBs returnedRecord = (PkblobsWithBLOBs) answer.get(0);
assertEquals(record.getId(), returnedRecord.getId());
assertTrue(TestUtilities.blobsAreEqual(record.getBlob1(), returnedRecord
.getBlob1()));
assertTrue(TestUtilities.blobsAreEqual(record.getBlob2(), returnedRecord
.getBlob2()));
} catch (SQLException e) {
fail(e.getMessage());
}
}