title: Mocking a singleton in Groovy
body: <p>In Groovy / Spock I can mock a class by doing:</p>
  
  <pre><code>def theClass = Mock(TheClass.class)
  </code></pre>
  
  <p>and then wire that instance into the class under unit test. What about if I want to mock a class that has been annotated as a @Singleon</p>