// Path: joiner-test-support/src/main/java/cz/encircled/joiner/TestDataListener.java
// public class TestDataListener implements TestExecutionListener {
// 
//     public void beforeTestClass(TestContext testContext) throws Exception {
// 
//     }
// 
//     public void prepareTestInstance(TestContext testContext) throws Exception {
//         TestData bean = testContext.getApplicationContext().getBean(TestData.class);
//         bean.prepareData();
//     }
// 
//     public void beforeTestMethod(TestContext testContext) throws Exception {
// 
//     }
// 
//     public void afterTestMethod(TestContext testContext) throws Exception {
// 
//     }
// 
//     public void afterTestClass(TestContext testContext) throws Exception {
// 
//     }
// }
// 
// Path: joiner-core/src/test/java/cz/encircled/joiner/config/TestConfig.java
// @Configuration
// @Import(EntityManagerConfig.class)
// @ComponentScan(basePackages = {"cz.encircled.joiner"})
// public class TestConfig {
// 
//     @PersistenceContext
//     private EntityManager entityManager;
// 
//     @Bean
//     public JoinGraphRegistry joinGraphRegistry() {
//         return new DefaultJoinGraphRegistry();
//     }
// 
//     @Bean
//     public Joiner joiner(JoinGraphRegistry joinGraphRegistry) {
//         Joiner joiner = new Joiner(entityManager);
//         joiner.setJoinGraphRegistry(joinGraphRegistry);
//         return joiner;
//     }
// 
// }
// 
// Path: joiner-test-support/src/main/java/cz/encircled/joiner/model/AbstractEntity.java
// @MappedSuperclass
// public class AbstractEntity {
// 
//     @Column
//     @Id
//     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "id_generator")
//     @SequenceGenerator(name = "id_generator", sequenceName = "id_seq", initialValue = 1, allocationSize = 1)
//     protected Long id;
// 
//     @Column
//     protected String name;
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(final String name) {
//         this.name = name;
//     }
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(final Long id) {
//         this.id = id;
//     }
// }
// 
// Path: joiner-core/src/main/java/cz/encircled/joiner/query/join/JoinGraphRegistry.java
// public interface JoinGraphRegistry {
// 
//     /**
//      * Adds new join graph to the registry.
//      *
//      * @param graphName graph unique name. Generally, any object may be used as a name, it should have correct hashCode method. String or enum is recommended.
//      * @param joins associated joins
//      * @param rootClasses target class for a new join graph
//      */
//     void registerJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses);
// 
//     /**
//      * Replace an existing join graph with a new one
//      *
//      * @param graphName   graph unique name. Generally, any object may be used as a name, it should have correct hashCode method. String or enum is recommended.
//      * @param joins       associated joins
//      * @param rootClasses target class for a new join graph
//      */
//     void replaceJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses);
// 
//     /**
//      * Adds new join graph to the registry or replace an existing one.
//      *
//      * @param graphName   graph unique name. Generally, any object may be used as a name, it should have correct hashCode method. String or enum is recommended.
//      * @param joins       associated joins
//      * @param rootClasses target class for a new join graph
//      */
//     void registerOrReplaceJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses);
// 
//     /**
//      *
//      * @param clazz target class
//      * @param name join graph name
//      * @return collection of registered join graphs
//      */
//     List<JoinDescription> getJoinGraph(Class<?> clazz, Object name);
// 
//     /**
//      * @param clazz target class
//      * @return map of all registered join graphs
//      */
//     Map<Object, List<JoinDescription>> getAllJoinGraphs(Class<?> clazz);
// 
// }


import cz.encircled.joiner.TestDataListener;
import cz.encircled.joiner.config.TestConfig;
import cz.encircled.joiner.model.AbstractEntity;
import cz.encircled.joiner.query.join.JoinGraphRegistry;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.Transactional;
import javax.persistence.EntityManager;
import javax.persistence.Persistence;
import javax.persistence.PersistenceContext;
import java.util.Collection;
package cz.encircled.joiner.core;



/**
 * @author Kisel on 11.01.2016.
 */
@ExtendWith(SpringExtension.class)
@SpringJUnitConfig(classes = {TestConfig.class})
// Path: joiner-test-support/src/main/java/cz/encircled/joiner/TestDataListener.java
// public class TestDataListener implements TestExecutionListener {
// 
//     public void beforeTestClass(TestContext testContext) throws Exception {
// 
//     }
// 
//     public void prepareTestInstance(TestContext testContext) throws Exception {
//         TestData bean = testContext.getApplicationContext().getBean(TestData.class);
//         bean.prepareData();
//     }
// 
//     public void beforeTestMethod(TestContext testContext) throws Exception {
// 
//     }
// 
//     public void afterTestMethod(TestContext testContext) throws Exception {
// 
//     }
// 
//     public void afterTestClass(TestContext testContext) throws Exception {
// 
//     }
// }
// 
// Path: joiner-core/src/test/java/cz/encircled/joiner/config/TestConfig.java
// @Configuration
// @Import(EntityManagerConfig.class)
// @ComponentScan(basePackages = {"cz.encircled.joiner"})
// public class TestConfig {
// 
//     @PersistenceContext
//     private EntityManager entityManager;
// 
//     @Bean
//     public JoinGraphRegistry joinGraphRegistry() {
//         return new DefaultJoinGraphRegistry();
//     }
// 
//     @Bean
//     public Joiner joiner(JoinGraphRegistry joinGraphRegistry) {
//         Joiner joiner = new Joiner(entityManager);
//         joiner.setJoinGraphRegistry(joinGraphRegistry);
//         return joiner;
//     }
// 
// }
// 
// Path: joiner-test-support/src/main/java/cz/encircled/joiner/model/AbstractEntity.java
// @MappedSuperclass
// public class AbstractEntity {
// 
//     @Column
//     @Id
//     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "id_generator")
//     @SequenceGenerator(name = "id_generator", sequenceName = "id_seq", initialValue = 1, allocationSize = 1)
//     protected Long id;
// 
//     @Column
//     protected String name;
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(final String name) {
//         this.name = name;
//     }
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(final Long id) {
//         this.id = id;
//     }
// }
// 
// Path: joiner-core/src/main/java/cz/encircled/joiner/query/join/JoinGraphRegistry.java
// public interface JoinGraphRegistry {
// 
//     /**
//      * Adds new join graph to the registry.
//      *
//      * @param graphName graph unique name. Generally, any object may be used as a name, it should have correct hashCode method. String or enum is recommended.
//      * @param joins associated joins
//      * @param rootClasses target class for a new join graph
//      */
//     void registerJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses);
// 
//     /**
//      * Replace an existing join graph with a new one
//      *
//      * @param graphName   graph unique name. Generally, any object may be used as a name, it should have correct hashCode method. String or enum is recommended.
//      * @param joins       associated joins
//      * @param rootClasses target class for a new join graph
//      */
//     void replaceJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses);
// 
//     /**
//      * Adds new join graph to the registry or replace an existing one.
//      *
//      * @param graphName   graph unique name. Generally, any object may be used as a name, it should have correct hashCode method. String or enum is recommended.
//      * @param joins       associated joins
//      * @param rootClasses target class for a new join graph
//      */
//     void registerOrReplaceJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses);
// 
//     /**
//      *
//      * @param clazz target class
//      * @param name join graph name
//      * @return collection of registered join graphs
//      */
//     List<JoinDescription> getJoinGraph(Class<?> clazz, Object name);
// 
//     /**
//      * @param clazz target class
//      * @return map of all registered join graphs
//      */
//     Map<Object, List<JoinDescription>> getAllJoinGraphs(Class<?> clazz);
// 
// }


// Path: joiner-core/src/test/java/cz/encircled/joiner/core/AbstractTest.java
import cz.encircled.joiner.TestDataListener;
import cz.encircled.joiner.config.TestConfig;
import cz.encircled.joiner.model.AbstractEntity;
import cz.encircled.joiner.query.join.JoinGraphRegistry;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.Transactional;
import javax.persistence.EntityManager;
import javax.persistence.Persistence;
import javax.persistence.PersistenceContext;
import java.util.Collection;

package cz.encircled.joiner.core;



/**
 * @author Kisel on 11.01.2016.
 */
@ExtendWith(SpringExtension.class)
@SpringJUnitConfig(classes = {TestConfig.class})
@ContextConfiguration(classes = {TestConfig.class})