@DatabaseTearDown(value = UPDATE_DATASET, type = DatabaseOperation.DELETE_ALL)
public void testSave2() throws Exception {
try {
DatabaseConnection connection = new DatabaseConnection(dataSource.getConnection());
IDataSet expectedDataSet = new FlatXmlDataSetBuilder().build(this.getClass().getResource(UPDATE_DATASET).openStream());
DSP5 dsp5 = new DSP5();
DSP5 ndsp5;
ConcreteBusinessPartner cbp = new ConcreteBusinessPartner();
BusinessPartner bp = new BusinessPartner();
Set<ConcreteBusinessPartner> consignees = new HashSet<ConcreteBusinessPartner>();
bp.setId(1L);
bp.setName(BUSINESSPARTNER_NAME);
bp.setVersion(1);
cbp.setId(1L);
cbp.setCountry(CONCRETEBUSINESSPARTNER_COUNTRY);
cbp.setBusinessPartner(bp);
cbp.setVersion(1);
consignees.add(cbp);
dsp5.setId(1L);
dsp5.setLicenseNumber(UPDATED_LICENSE_NUMBER);
dsp5.setApplicant(cbp);
dsp5.setEndUser(cbp);
dsp5.setManufacturer(cbp);
dsp5.setSeller(cbp);
dsp5.setSourceOfCommodity(cbp);
dsp5.setApproval(APPROVAL_TYPE);
dsp5.getConsignees().addAll(consignees);
dsp5.setVersion(1);
ndsp5 = dsp5DAO.save(dsp5);
assertNotNull(ndsp5);
assertNotNull(dsp5.getLicenseNumber());
assertNotNull(dsp5.getApproval());
assertEquals(ndsp5.getLicenseNumber(), dsp5.getLicenseNumber());
assertEquals(ndsp5.getApproval(), dsp5.getApproval());
entityManager.getTransaction().commit();
DatabaseAssertionMode.NON_STRICT.getDatabaseAssertion().assertEquals(expectedDataSet,
connection.createDataSet(expectedDataSet.getTableNames()));
connection.close();
} catch (DatabaseUnitException e) {