// Path: spring-test-dbunit/src/main/java/com/github/springtestdbunit/TransactionDbUnitTestExecutionListener.java
// public class TransactionDbUnitTestExecutionListener extends TestExecutionListenerChain {
// 
// 	private static final Class<?>[] CHAIN = { TransactionalTestExecutionListener.class,
// 			DbUnitTestExecutionListener.class };
// 
// 	@Override
// 	protected Class<?>[] getChain() {
// 		return CHAIN;
// 	}
// 
// }
// 
// Path: spring-test-dbunit/src/main/java/com/github/springtestdbunit/annotation/DatabaseOperation.java
// public enum DatabaseOperation {
// 
// 	/**
// 	 * Updates the contents of existing database tables from the dataset.
// 	 */
// 	UPDATE,
// 
// 	/**
// 	 * Inserts new database tables and contents from the dataset.
// 	 */
// 	INSERT,
// 
// 	/**
// 	 * Refresh the contents of existing database tables. Rows from the dataset will insert or replace existing data. Any
// 	 * database rows that are not in the dataset remain unaffected.
// 	 */
// 	REFRESH,
// 
// 	/**
// 	 * Deletes database table rows that matches rows from the dataset.
// 	 */
// 	DELETE,
// 
// 	/**
// 	 * Deletes all rows from a database table when the table is specified in the dataset. Tables in the database but not
// 	 * in the dataset remain unaffected.
// 	 * @see #TRUNCATE_TABLE
// 	 */
// 	DELETE_ALL,
// 
// 	/**
// 	 * Deletes all rows from a database table when the table is specified in the dataset. Tables in the database but not
// 	 * in the dataset are unaffected. Identical to {@link #DELETE_ALL} expect this operation cannot be rolled back and
// 	 * is supported by less database vendors.
// 	 * @see #DELETE_ALL
// 	 */
// 	TRUNCATE_TABLE,
// 
// 	/**
// 	 * Deletes all rows from a database table when the tables is specified in the dataset and subsequently insert new
// 	 * contents. Equivalent to calling {@link #DELETE_ALL} followed by {@link #INSERT}.
// 	 */
// 	CLEAN_INSERT;
// 
// }
// 
// Path: spring-test-dbunit/src/test/java/com/github/springtestdbunit/entity/EntityAssert.java
// public class EntityAssert implements InitializingBean {
// 
// 	@PersistenceContext
// 	private EntityManager entityManager;
// 
// 	private CriteriaQuery<SampleEntity> criteriaQuery;
// 
// 	public void afterPropertiesSet() throws Exception {
// 		CriteriaBuilder cb = this.entityManager.getCriteriaBuilder();
// 		this.criteriaQuery = cb.createQuery(SampleEntity.class);
// 		Root<SampleEntity> from = this.criteriaQuery.from(SampleEntity.class);
// 		this.criteriaQuery.orderBy(cb.asc(from.get("value").as(String.class)));
// 	}
// 
// 	public void assertValues(String... values) {
// 		SortedSet<String> expected = new TreeSet<String>(Arrays.asList(values));
// 		SortedSet<String> actual = new TreeSet<String>();
// 		TypedQuery<SampleEntity> query = this.entityManager.createQuery(this.criteriaQuery);
// 		List<SampleEntity> results = query.getResultList();
// 		for (SampleEntity sampleEntity : results) {
// 			actual.add(sampleEntity.getValue());
// 			this.entityManager.detach(sampleEntity);
// 		}
// 		assertEquals(expected, actual);
// 	}
// 
// }


import static org.junit.Assert.assertEquals;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import javax.sql.DataSource;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.transaction.annotation.Transactional;
import com.github.springtestdbunit.TransactionDbUnitTestExecutionListener;
import com.github.springtestdbunit.annotation.DatabaseOperation;
import com.github.springtestdbunit.annotation.DatabaseSetup;
import com.github.springtestdbunit.annotation.DbUnitConfiguration;
import com.github.springtestdbunit.annotation.ExpectedDatabase;
import com.github.springtestdbunit.entity.EntityAssert;
/*
 * Copyright 2002-2016 the original author or authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.springtestdbunit.multiconnection;






@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/META-INF/dbunit-context.xml")
@TestExecutionListeners({ DependencyInjectionTestExecutionListener.class,
// Path: spring-test-dbunit/src/main/java/com/github/springtestdbunit/TransactionDbUnitTestExecutionListener.java
// public class TransactionDbUnitTestExecutionListener extends TestExecutionListenerChain {
// 
// 	private static final Class<?>[] CHAIN = { TransactionalTestExecutionListener.class,
// 			DbUnitTestExecutionListener.class };
// 
// 	@Override
// 	protected Class<?>[] getChain() {
// 		return CHAIN;
// 	}
// 
// }
// 
// Path: spring-test-dbunit/src/main/java/com/github/springtestdbunit/annotation/DatabaseOperation.java
// public enum DatabaseOperation {
// 
// 	/**
// 	 * Updates the contents of existing database tables from the dataset.
// 	 */
// 	UPDATE,
// 
// 	/**
// 	 * Inserts new database tables and contents from the dataset.
// 	 */
// 	INSERT,
// 
// 	/**
// 	 * Refresh the contents of existing database tables. Rows from the dataset will insert or replace existing data. Any
// 	 * database rows that are not in the dataset remain unaffected.
// 	 */
// 	REFRESH,
// 
// 	/**
// 	 * Deletes database table rows that matches rows from the dataset.
// 	 */
// 	DELETE,
// 
// 	/**
// 	 * Deletes all rows from a database table when the table is specified in the dataset. Tables in the database but not
// 	 * in the dataset remain unaffected.
// 	 * @see #TRUNCATE_TABLE
// 	 */
// 	DELETE_ALL,
// 
// 	/**
// 	 * Deletes all rows from a database table when the table is specified in the dataset. Tables in the database but not
// 	 * in the dataset are unaffected. Identical to {@link #DELETE_ALL} expect this operation cannot be rolled back and
// 	 * is supported by less database vendors.
// 	 * @see #DELETE_ALL
// 	 */
// 	TRUNCATE_TABLE,
// 
// 	/**
// 	 * Deletes all rows from a database table when the tables is specified in the dataset and subsequently insert new
// 	 * contents. Equivalent to calling {@link #DELETE_ALL} followed by {@link #INSERT}.
// 	 */
// 	CLEAN_INSERT;
// 
// }
// 
// Path: spring-test-dbunit/src/test/java/com/github/springtestdbunit/entity/EntityAssert.java
// public class EntityAssert implements InitializingBean {
// 
// 	@PersistenceContext
// 	private EntityManager entityManager;
// 
// 	private CriteriaQuery<SampleEntity> criteriaQuery;
// 
// 	public void afterPropertiesSet() throws Exception {
// 		CriteriaBuilder cb = this.entityManager.getCriteriaBuilder();
// 		this.criteriaQuery = cb.createQuery(SampleEntity.class);
// 		Root<SampleEntity> from = this.criteriaQuery.from(SampleEntity.class);
// 		this.criteriaQuery.orderBy(cb.asc(from.get("value").as(String.class)));
// 	}
// 
// 	public void assertValues(String... values) {
// 		SortedSet<String> expected = new TreeSet<String>(Arrays.asList(values));
// 		SortedSet<String> actual = new TreeSet<String>();
// 		TypedQuery<SampleEntity> query = this.entityManager.createQuery(this.criteriaQuery);
// 		List<SampleEntity> results = query.getResultList();
// 		for (SampleEntity sampleEntity : results) {
// 			actual.add(sampleEntity.getValue());
// 			this.entityManager.detach(sampleEntity);
// 		}
// 		assertEquals(expected, actual);
// 	}
// 
// }


// Path: spring-test-dbunit/src/test/java/com/github/springtestdbunit/multiconnection/MultiConnectionTest.java
import static org.junit.Assert.assertEquals;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import javax.sql.DataSource;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.transaction.annotation.Transactional;
import com.github.springtestdbunit.TransactionDbUnitTestExecutionListener;
import com.github.springtestdbunit.annotation.DatabaseOperation;
import com.github.springtestdbunit.annotation.DatabaseSetup;
import com.github.springtestdbunit.annotation.DbUnitConfiguration;
import com.github.springtestdbunit.annotation.ExpectedDatabase;
import com.github.springtestdbunit.entity.EntityAssert;

/*
 * Copyright 2002-2016 the original author or authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.springtestdbunit.multiconnection;






@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/META-INF/dbunit-context.xml")
@TestExecutionListeners({ DependencyInjectionTestExecutionListener.class,
		TransactionDbUnitTestExecutionListener.class, })