title: Grails - How to inject bean defined in resources.groovy in integration test
body: <p>I have 1 bean defined in resources.groovy</p>
  
  <pre><code>cachedbean(serviceImpl) {
    }
  </code></pre>
  
  <p>In service I am using it this way</p>
  
  <pre><code>    MyService{
  
        static transactional = false
        def cachedbean
  
          myMeth(){
           cachedbean.get("cacheKey")
        }
     }
  </code></pre>
  
  <p>This works fine but when I try to test it with integration test, I get <code>nullpointer</code> exception on '<code>get</code>'
  cachedbean.<code>get</code>("cacheKey").</p>
  
  <p>How does it work?</p>