title: autowired @components null in unit test
body: <p>I have a class: </p>
  
  <pre><code>@Component
  public class B {
      @Autowired
      private A a; 
  }
  </code></pre>
  
  <p>and A is a component: </p>
  
  <pre><code>@Component
  public class A{}
  </code></pre>
  
  <p>In unit test class BTest: </p>
  
  <pre><code>public class BTest {
      @Test
      public void testBMethod() {
      }
  }
  </code></pre>
  
  <p>I am not using an xml to define context or for beans to be picked from. </p>
  
  <p>What is the cleanest way I can get the test to run? </p>