Code example for AbstractTransactionalTestNGSpringContextTests

0
 * 
 * @author vitaly.yakunin 
 */ 
@ContextConfiguration(locations = {"classpath:applicationContext-test.xml","classpath:dozer-application-context-test.xml"}) 
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) 
public class UserAttributeDAOTouchTest extends AbstractTransactionalTestNGSpringContextTests { 
 
    @Autowired 
    private UserAttributeDAO userAttributeDAO; 
 
    @Test 
    public void touchAdd() { 
        userAttributeDAO.add(new UserAttributeEntity()); 
    } 
 
    @Test 
    public void touchAttachClean() { 
        UserAttributeEntity userAttribute = new UserAttributeEntity(); 
        userAttributeDAO.add(userAttribute); 
        userAttributeDAO.attachClean(userAttribute);