title: Reset mysql database before running a JUnit test
body: <p>I have around 10 JUnit that will be executed automatically. I would like to reset the database in every of them. I have this piece of code:</p>
  
  <pre><code>//@Transactional
  public class TestMediaObjectService extends AbstractDataAccessTest{
  
  //This method reset the database, emptying the tables
      @Test
      public void testCreateDataBase() throws Exception {
          TestDatabaseCreation creation = new TestDatabaseCreation();
          creation.resetDatabase();
      }
  
  //This is one of the methods. 
      @Test
      public void testStoreMediaObject() throws Exception {
  //......
  }
  </code></pre>
  
  <p>When I reset the database manually with the same script that I am using in the method <code>testCreateDataBase</code> and after that run this test (without that method), the tables are created automatically. But if I run the code as I have pasted above, that tables are not created, therefore I get this error:  </p>
  
  <blockquote>
    <p>Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'one_table' doesn't exist</p>
  </blockquote>
  
  <p>How could I run that method in every before running other methods in the test? The annotation <code>@Transactional</code> was removed, but error was still there.</p>