Code example for AbstractTransactionalTestNGSpringContextTests

0
 * @author Mikhail Stryzhonok 
 */ 
@ContextConfiguration(locations = {"classpath:/org/jtalks/jcommune/model/entity/applicationContext-dao.xml"}) 
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) 
@Transactional 
public class BranchReadedMarkerDaoTest extends AbstractTransactionalTestNGSpringContextTests { 
 
    @Autowired 
    private BranchReadedMarkerDao dao; 
 
    @Autowired 
    private SessionFactory sessionFactory; 
 
    private JCUser user; 
    private Branch branch; 
    private Session session; 
 
    @BeforeMethod 
    public void init() { 
        session = sessionFactory.getCurrentSession();