title: No such property in Groovy test case
body: <p>I have a Groovy test class <code>MsgDispatcherTest extends GroovyTestCase</code>.<br>
  Within this class there is the following test case:</p>
  
  <pre><code>@Test
  void test_register()
  {
      def d = MsgDispatcher.instance    // MsgDispatcher is a singelton
      def cb1Called = 0
      def cb1 = { cb1Called++; void }
  
      d.registerCallback("msg1", cb1)   // closure cb1 should be registered
  }
  </code></pre>
  
  <p>And the interface of <code>MsgDispatcher.registerCallback</code> looks like this:</p>
  
  <pre><code>void registerCallback(String message, Closure callback)
  {
      assert callback &amp;&amp; message
      // ...
  }
  </code></pre>
  
  <p>Now when I run this test case I get the following error message on the call to <code>d.registerCallback("msg1", cb1)</code>:</p>
  
  <p><em>groovy.lang.MissingPropertyException: No such property: msg1 for class: ecs.MsgDispatcherTest</em></p>
  
  <p>Any ideas what I am missing here?</p>