title: SpringBeanAutowiringSupport does not inject beans in jUnit tests
body: <p>I use <a href="http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/context/support/SpringBeanAutowiringSupport.html" rel="nofollow">SpringBeanAutowiringSupport</a> for bean injection in some objects. Problem is, that injection of beans does not work in jUnit tests. For testing is used SpringJUnit4ClassRunner.</p>
  
  <pre><code>public class DossierReportItemXlsImporterImpl implements DossierRerportItemXlsImporer {
  
      private final Logger logger = Logger.getLogger(getClass());
      // are not autowired.
      @Autowired
      private DossierReportService dossierReportService;
      @Autowired
      private DossierReportItemService dossierReportItemService;
      @Autowired
      private NandoCodeService nandoCodeService;
  
      public DossierReportItemXlsImporterImpl(){
          SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
      }
  
      //...
  }
  
  
  public class DossierRerportItemXlsImporerTest extends AuditorServiceTest{
  
      // injected OK
      @Autowired
      private DossierReportService dossierReportService;
      @Autowired
      private DossierReportItemService dossierReportItemService;
  
      @Test
      public void testXlsImport(){
          DossierRerportItemXlsImporer importer = new DossierReportItemXlsImporterImpl();
          importer.processImport(createDossierReport(), loadFile());
          // ...
      }
    // ...
  }
  </code></pre>
  
  <p>Does anyone have any idea, why injection using <code>SpringBeanAutowiringSupport</code> does not work in jUnit tests?</p>