title: Jersey 2.x + JUnit + Spring Managed Resource?
body: <p>I've done a lot of searches an I can't find an example of a Jersey 2.x junit test that uses Spring managed resource beans.</p>
  
  <p>The following is what I'm trying and it isn't working. It errors that MySpringManagedResource does not have a no argument constructor, which suggests it is just ignoring Spring.</p>
  
  <pre><code>public class MyServiceUnitTest extends JerseyTest {
      @Override
      protected Application configure() {
          return new ResourceConfig(MySpringManagedResource.class).
                  register(org.glassfish.jersey.server.spring.SpringComponentProvider.class).
                  register(MySpringConfigBean.class);
      }
  
      ...
  }
  </code></pre>