public void testSave2() throws Exception {
try {
DatabaseConnection connection = new DatabaseConnection(dataSource.getConnection());
IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(this.getClass()
.getResource("/dbunit/dao/admin/profile-update_aftersave.xml").openStream());
Profile profile = new Profile();
Profile nprofile;
profile.setId(1L);
profile.setAdministrator(true);
profile.setLicensesConsultation(true);
profile.setLicensesEdition(true);
profile.setProgramsConsultation(true);
profile.setProgramsEdition(true);
profile.setName(ADMINISTRATOR_PROFILE_NAME);
profile.setVersion(1);
nprofile = profileDAO.save(profile);
assertNotNull(nprofile);
assertEquals(nprofile.getName(), profile.getName());
assertEquals(nprofile.getAdministrator(), profile.getAdministrator());
assertEquals(nprofile.getLicensesConsultation(), profile.getLicensesConsultation());
assertEquals(nprofile.getLicensesEdition(), profile.getLicensesEdition());
assertEquals(nprofile.getProgramsConsultation(), profile.getProgramsConsultation());
assertEquals(nprofile.getProgramsEdition(), profile.getProgramsEdition());
entityManager.getTransaction().commit();
DatabaseAssertionMode.NON_STRICT.getDatabaseAssertion().assertEquals(expectedDataSet,
connection.createDataSet(expectedDataSet.getTableNames()));
connection.close();
} catch (DatabaseUnitException e) {