title: IntelliJ Idea + Could not autowire. No beans of type found
body: <p>I keep seeing below error in my IntelliJ Idea, however the code works fine during execution. </p>
  
  <pre><code>Could not autowire. No beans of 'PortfolioRequestHandler' type found. less... (Ctrl+F1) 
  Inspection info:Checks autowiring problems in a bean class.
  </code></pre>
  
  <blockquote>
    <p>Sample Code</p>
  </blockquote>
  
  <pre><code>@ActiveProfiles("test")
  @RunWith(SpringRunner.class)
  @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD)
  @SpringBootTest(classes = {Application.class})
  public class PortfolioRequestHandlerTest {
  
      @Autowired
      private PortfolioRequestHandler portfolioRequestHandler;
  
      ...
      ...
  }
  </code></pre>
  
  <p>How do I get rid of this? I am using IntelliJ Idea ULTIMATE 2018.2</p>