title: unit testing src/groovy class files
body: <p>I'm working on unit tests for a grails application. I've been successful at testing services and domains but stuck trying to test classes in the <code>src/groovy</code> folder. What do I have to do to access the <code>saveCreateAndCall</code> method?</p>
  
  <pre><code>@Artefact("Controller")
  @Transactional(readOnly = true)
  class BaseController&lt;T&gt; extends RestfulController&lt;T&gt; {
  
      protected def saveCreateAndCall(Object instance, boolean flush = false, Closure c) {
          if (instance.save(flush: flush)) {
              c.call instance
          } else {
              errorCreateResponse(instance)
          }
      }
  </code></pre>
  
  <p>any advice or feedback would be appreciated, thanks</p>