title: Unit test with testNG in spring boot takes time to build project
body: <p>I have created a web application in spring-boot. I am writing a unit tests with testNG for my business layer.</p>
  
  <p>I have created Application class</p>
  
  <pre><code>@SpringBootApplication
  public class TestApplication
  {
      public static void main(String[] args)
      {
          SpringApplication.run(TestApplication.class, args);
      }
  
      @Bean
      Mapper mapper()
      {
          List&lt;String&gt; mappingFiles = new ArrayList&lt;String&gt;();
          mappingFiles.add("dozer-mappings.xml");
          return new DozerBeanMapper(mappingFiles);
      }
  }
  </code></pre>
  
  <p>My test classes are looks like</p>
  
  <pre><code>@ContextConfiguration(classes = { TestApplication.class })
  public class CommissionRuleServiceTest extends AbstractTestNGSpringContextTests
  {
       @InjectMocks
       @Autowired
       MyService
  
       @Mock
       MyDAO;
  
       @BeforeMethod
       public void initMock()
       {
            MockitoAnnotations.initMocks(this);
       }
  
       @Test(dataProvider = "....")
       ......
       ......
  }
  </code></pre>
  
  <p>When I run project it shows hugh log on console and it takes times say 20.00secs for just few small tests.
  Some of statements from log are,</p>
  
  <blockquote>
    <p>DEBUG o.s.c.i.s.PathMatchingResourcePatternResolver - Searching directory
    DEBUG o.s.c.a.ConfigurationClassPostProcessor 
    DEBUG o.s.c.a.ClassPathBeanDefinitionScanner 
    DEBUG o.s.c.i.s.PathMatchingResourcePatternResolver
    DEBUG o.s.b.f.s.DefaultListableBeanFactory 
    DEBUG o.a.c.b.converters.ArrayConverter 
    DEBUG org.dozer.loader.xml.XMLParser
    DEBUG org.hibernate.cfg.SettingsFactory
    DEBUG o.h.cfg.annotations.CollectionBinder
    DEBUG o.h.cfg.annotations.TableBinder
    DEBUG o.h.p.w.spi.MetamodelGraphWalker - Visiting attribute path : MyEntity
    DEBUG o.s.b.f.s.DefaultListableBeanFactory 
    DEBUG org.hibernate.SQL</p>
  </blockquote>
  
  <p>Why it is taking such a "hugh" time? What should I need to do?</p>