// Path: src/main/java/com/_4dconcept/springframework/data/marklogic/repository/MarklogicRepository.java
// @NoRepositoryBean
// public interface MarklogicRepository<T, ID>
//         extends PagingAndSortingRepository<T, ID>, QueryByExampleExecutor<T> {
// 
//     /*
// 	 * (non-Javadoc)
// 	 * @see org.springframework.data.repository.CrudRepository#save(java.lang.Iterable)
// 	 */
//     <S extends T> List<S> saveAll(Iterable<S> entites);
// 
//     /*
//      * (non-Javadoc)
//      * @see org.springframework.data.repository.CrudRepository#findAll()
//      */
//     List<T> findAll();
// 
//     /*
//      * (non-Javadoc)
//      * @see org.springframework.data.repository.PagingAndSortingRepository#findAll(org.springframework.data.domain.Sort)
//      */
//     List<T> findAll(Sort sort);
// 
//     /*
//      * (non-Javadoc)
//      * @see org.springframework.data.repository.CrudRepository#findAll(java.lang.Iterable)
//      */
//     List<T> findAllById(Iterable<ID> ids);
// 
//     /* (non-Javadoc)
//          * @see org.springframework.data.repository.query.QueryByExampleExecutor#findAll(org.springframework.data.domain.Example)
//          */
//     <S extends T> List<S> findAll(Example<S> example);
// 
//     /* (non-Javadoc)
// 	 * @see org.springframework.data.repository.query.QueryByExampleExecutor#findAll(org.springframework.data.domain.Example, org.springframework.data.domain.Sort)
// 	 */
//     <S extends T> List<S> findAll(Example<S> example, Sort sort);
// 
// }


import java.util.Collection;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import com._4dconcept.springframework.data.marklogic.core.mapping.Document;
import com._4dconcept.springframework.data.marklogic.repository.MarklogicRepository;
import org.junit.Test;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.DefaultBeanNameGenerator;
import org.springframework.core.env.Environment;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource;
import org.springframework.data.repository.config.RepositoryConfiguration;
import org.springframework.data.repository.config.RepositoryConfigurationSource;
                return;
            }
        }

        fail("Expected to find config for repository interface ".concat(repositoryInterface.getName()).concat(" but got ")
                .concat(configs.toString()));
    }

    private static void assertDoesNotHaveRepo(Class<?> repositoryInterface,
                                              Collection<RepositoryConfiguration<RepositoryConfigurationSource>> configs) {

        for (RepositoryConfiguration<?> config : configs) {
            if (config.getRepositoryInterface().equals(repositoryInterface.getName())) {
                fail("Expected not to find config for repository interface ".concat(repositoryInterface.getName()));
            }
        }
    }

    @EnableMarklogicRepositories(considerNestedRepositories = true)
    static class Config {

    }

    @Document
    static class Sample {}

    interface SampleRepository extends Repository<Sample, Long> {}

    interface UnannotatedRepository extends Repository<Object, Long> {}

// Path: src/main/java/com/_4dconcept/springframework/data/marklogic/repository/MarklogicRepository.java
// @NoRepositoryBean
// public interface MarklogicRepository<T, ID>
//         extends PagingAndSortingRepository<T, ID>, QueryByExampleExecutor<T> {
// 
//     /*
// 	 * (non-Javadoc)
// 	 * @see org.springframework.data.repository.CrudRepository#save(java.lang.Iterable)
// 	 */
//     <S extends T> List<S> saveAll(Iterable<S> entites);
// 
//     /*
//      * (non-Javadoc)
//      * @see org.springframework.data.repository.CrudRepository#findAll()
//      */
//     List<T> findAll();
// 
//     /*
//      * (non-Javadoc)
//      * @see org.springframework.data.repository.PagingAndSortingRepository#findAll(org.springframework.data.domain.Sort)
//      */
//     List<T> findAll(Sort sort);
// 
//     /*
//      * (non-Javadoc)
//      * @see org.springframework.data.repository.CrudRepository#findAll(java.lang.Iterable)
//      */
//     List<T> findAllById(Iterable<ID> ids);
// 
//     /* (non-Javadoc)
//          * @see org.springframework.data.repository.query.QueryByExampleExecutor#findAll(org.springframework.data.domain.Example)
//          */
//     <S extends T> List<S> findAll(Example<S> example);
// 
//     /* (non-Javadoc)
// 	 * @see org.springframework.data.repository.query.QueryByExampleExecutor#findAll(org.springframework.data.domain.Example, org.springframework.data.domain.Sort)
// 	 */
//     <S extends T> List<S> findAll(Example<S> example, Sort sort);
// 
// }


// Path: src/test/java/com/_4dconcept/springframework/data/marklogic/repository/config/MarklogicRepositoryConfigurationExtensionTest.java
import java.util.Collection;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import com._4dconcept.springframework.data.marklogic.core.mapping.Document;
import com._4dconcept.springframework.data.marklogic.repository.MarklogicRepository;
import org.junit.Test;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.DefaultBeanNameGenerator;
import org.springframework.core.env.Environment;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource;
import org.springframework.data.repository.config.RepositoryConfiguration;
import org.springframework.data.repository.config.RepositoryConfigurationSource;

                return;
            }
        }

        fail("Expected to find config for repository interface ".concat(repositoryInterface.getName()).concat(" but got ")
                .concat(configs.toString()));
    }

    private static void assertDoesNotHaveRepo(Class<?> repositoryInterface,
                                              Collection<RepositoryConfiguration<RepositoryConfigurationSource>> configs) {

        for (RepositoryConfiguration<?> config : configs) {
            if (config.getRepositoryInterface().equals(repositoryInterface.getName())) {
                fail("Expected not to find config for repository interface ".concat(repositoryInterface.getName()));
            }
        }
    }

    @EnableMarklogicRepositories(considerNestedRepositories = true)
    static class Config {

    }

    @Document
    static class Sample {}

    interface SampleRepository extends Repository<Sample, Long> {}

    interface UnannotatedRepository extends Repository<Object, Long> {}

    interface StoreRepository extends MarklogicRepository<Object, Long> {}