@@ -0,0 +1,3092 @@
+package net.rakugakibox.spring.boot.orika;%0A%0Aimport ma.glasnost.orika.MapperFactory;%0Aimport ma.glasnost.orika.impl.DefaultMapperFactory.MapperFactoryBuilder;%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.beans.factory.annotation.Qualifier;%0Aimport org.springframework.boot.autoconfigure.EnableAutoConfiguration;%0Aimport org.springframework.boot.test.context.SpringBootTest;%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.test.context.junit4.SpringRunner;%0A%0A/**%0A * The %7B@link OrikaAutoConfiguration%7D's test cases when customize %7B@link MapperFactory%7D.%0A */%0A@RunWith(SpringRunner.class)%0A@SpringBootTest%0Apublic class OrikaAutoConfigurationMapperFactoryCustomizingTest %7B%0A%0A    /**%0A     * The %7B@link MapperFactory%7D.%0A     */%0A    @Autowired%0A    protected MapperFactory orikaMapperFactory;%0A%0A    /**%0A     * The %7B@link MapperFactory%7D's configuration 1.%0A     */%0A    @Autowired%0A    @Qualifier(%22orikaMapperFactoryConfiguration1%22)%0A    protected OrikaMapperFactoryConfiguration orikaMapperFactoryConfiguration1;%0A%0A    /**%0A     * The %7B@link MapperFactory%7D's configuration 1.%0A     */%0A    @Autowired%0A    @Qualifier(%22orikaMapperFactoryConfiguration2%22)%0A    protected OrikaMapperFactoryConfiguration orikaMapperFactoryConfiguration2;%0A%0A    /**%0A     * Tests the %7B@link OrikaAutoConfiguration#orikaMapperFactory(MapperFactoryBuilder)%7D.%0A     */%0A    @Test%0A    public void orikaMapperFactory_configurerShouldBeCalled() %7B%0A        assertThat(orikaMapperFactoryConfiguration1.mapperFactory).isSameAs(orikaMapperFactory);%0A        assertThat(orikaMapperFactoryConfiguration1.mapperFactory).isSameAs(orikaMapperFactory);%0A    %7D%0A%0A    /**%0A     * The context configuration.%0A     */%0A    @Configuration%0A    @EnableAutoConfiguration%0A    public static class ContextConfiguration %7B%0A%0A        /**%0A         * Creates a %7B@link MapperFactory%7D's configuration 1.%0A         *%0A         * @return a %7B@link MapperFactory%7D's configuration 1.%0A         */%0A        @Bean%0A        public OrikaMapperFactoryConfiguration orikaMapperFactoryConfiguration1() %7B%0A            return new OrikaMapperFactoryConfiguration();%0A        %7D%0A%0A        /**%0A         * Creates a %7B@link MapperFactory%7D's configuration 2.%0A         *%0A         * @return a %7B@link MapperFactory%7D's configuration 2.%0A         */%0A        @Bean%0A        public OrikaMapperFactoryConfiguration orikaMapperFactoryConfiguration2() %7B%0A            return new OrikaMapperFactoryConfiguration();%0A        %7D%0A%0A    %7D%0A%0A    /**%0A     * The %7B@link MapperFactory%7D's configuration.%0A     */%0A    public static class OrikaMapperFactoryConfiguration implements OrikaMapperFactoryConfigurer %7B%0A%0A        /**%0A         * The %7B@link MapperFactory%7D.%0A         */%0A        private MapperFactory mapperFactory;%0A%0A        /** %7B@inheritDoc%7D */%0A        @Override%0A        public void configure(MapperFactory mapperFactory) %7B%0A            this.mapperFactory = mapperFactory;%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

Test when customize MapperFactory