title: Spring boot test how to import data.sql just once during of h2 testing
body: <p>I want to test my spring boot application via h2 in memory database where I would like to use:</p>
  
  <p><code>spring.jpa.hibernate.ddl-auto: update</code></p>
  
  <p>However, once I want to run tests with this command:</p>
  
  <pre><code>mvn clean test
  </code></pre>
  
  <p>it will show some errors which are related to constraint violations (ID must be unique). 
  These ones were caused because the <code>data.sql</code> file (just with insert statements) is executed more times and hence the data cannot be inserted because of violation consistency.</p>
  
  <p>Is there some way to solve this problem? It would be good to execute data.sql script just once but not sure. Or to load spring boot application context once.</p>