### Question:
AppConfig { @Bean(destroyMethod = "close") public DataSource dataSource() { var basicDataSource = new BasicDataSource(); basicDataSource.setDriverClassName("org.h2.Driver"); basicDataSource.setUrl("jdbc:h2:~/databases/person"); basicDataSource.setUsername("sa"); basicDataSource.setPassword("sa"); return basicDataSource; }  @Bean(destroyMethod = "close") DataSource dataSource(); @Bean LocalContainerEntityManagerFactoryBean entityManagerFactory(); @Bean JpaTransactionManager transactionManager(); static void main(String[] args);  }### Answer:
@Test public void testDataSource() { assertNotNull(dataSource); }