title: Spring Transaction Management Test
body: <p>I want to test my Dao Class using the SpringContextTests.<br />
  In my method class I extended the <code>AbstractTransactionalJUnit4SpringContextTests</code> in order for my test class to integrate with JUnit4. I have also set up the configurations and made the initialization and database clean up in the <code>@Before</code> and tearDown in the <code>@After</code>. My test class works perfectly.
  <br />
  <br />
  My problem was, when I run my test class and the database is filled with data, the original data was not rolled back and my database is cleared. In the <code>@Before</code> method, I clear the database and populate data, thinking that I will be able to rollback it but its not.
  <br />
  <br />
  Can anyone site an example that works and rollbacks information in the database.
  <br />
  <br />
  ADDONS:<br />
  Every database manipulation in my test methods are rolled back. But the execution of <code>super.deleteFromTables("person")</code> in the <code>@Before</code> method did not rollback all the previous data from the database.<br />
  <br />
  Spring rollbacks all the CRUD operations but the database clean up before the transaction do not rollback.</p>