title: H2 DB Initial Set Up scripts are getting called multiple times in JUNIT
body: <p>Am trying to write JUNIT test cases with H2 DB for my micorservices. I have some .sql files for initial set up of the DB, like creating the schema, tables etc. One issue am seeing here is that the .sql files are getting called multiple times, once per JUNIT test file. Is there any way to handle this scenario? My DB Set up file looks like this -</p>
  
  <pre><code>@Configuration
  @ComponentScan(basePackages={"com.sample.repository"})
  
  public class SampleDBConfig {
  
  JdbcTemplate jdbcTemplate = null;
  DataSource dataSource = null;
  
  @Bean
  public JdbcTemplate jdbcTemplate()
  {
      if(jdbcTemplate == null){
          LOGGER.info("JdbcTemplate is null, so calling to create ");
          jdbcTemplate = new JdbcTemplate(getDataSource());
      }else{
          LOGGER.info("JdbcTemplate is already set");
      }
      return jdbcTemplate;
  }
  
  @Bean
  public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
     return new PropertySourcesPlaceholderConfigurer();
  }
  
  @Bean
  DataSource getDataSource() {
      EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
      if(dataSource == null){
          dataSource = builder
                  .setType(EmbeddedDatabaseType.H2)
                  .addScript("classpath:folder/initial-setup.sql")
                  .build();
      }
      return dataSource;
  }
  
  }
  </code></pre>
  
  <p>One of my JUNIT test class looks like this -</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(classes = SampleDBConfig.class)
  public class XyxImplTest{
  
  @Autowired
  ClassInTestImpl classInTestImpl ;
  
  @Test
  public void testMethod(){
  .......
  }
  }
  </code></pre>
  
  <p>And one of the classes am testing are like this -</p>
  
  <pre><code>@Component
  @Transactional(rollbackFor = Exception.class)
  public class ClassInTestImpl implements ClassInTest {
  
  @Autowired
  private JdbcTemplate jdbcTemplate;
  .....
  </code></pre>