title: Spring ComponentScan excludeFilters annotation not working in Spring Boot Test context
body: <p>I am using Spring Boot 1.4.3.RELEASE and want to exclude some components from being scanned when running the tests. </p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest
  @ComponentScan(
          basePackages = {"com.foobar"},
          excludeFilters =  @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {AmazonKinesisRecordChecker.class, MyAmazonCredentials.class}))
  public class ApplicationTests {
  
      @Test
      public void contextLoads() {
      }
  
  }
  </code></pre>
  
  <p>Despite the filters, when I run the test the unwanted components are loaded and Spring Boot crashes as those classes require an AWS environment to work properly:</p>
  
  <pre><code>2017-01-25 16:02:49.234 ERROR 10514 --- [           main] o.s.boot.SpringApplication               : Application startup failed
  
  org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'amazonKinesisRecordChecker' defined in file 
  </code></pre>
  
  <p><strong>Question:</strong> how can I make the filters working?</p>