title: How to unit test a service in grails 2.0.3?
body: <p>I created a unit test for a service in grails 2.0.3 and i want to run this test with junit runner in eclipse. When i right click on the test-class => debug as => junit test i get the following error message in console:</p>
  
  <pre><code>Class not found myProject.ReportServiceTests
  java.lang.ClassNotFoundException: myProject.ReportServiceTests
  at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:693)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:429)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  </code></pre>
  
  <p>My ReportServiceTest.groovy in test/unit/myProject:</p>
  
  <pre><code>package myProject
  
  import grails.test.mixin.*
  import grails.test.mixin.support.*
  import org.junit.*
  
  /**
  * See the API for {@link grails.test.mixin.support.GrailsUnitTestMixin} for usage     instructions
  */
  
  @TestFor(myProject.ReportService)
  @Mock(Sale)
  class ReportServiceTests {
  
  void setUp() {
      // Setup logic here
  }
  
  void tearDown() {
      // Tear down logic here
  }
  
  void testSomething() {
      fail "Implement me"
  }
  
  void testGetSalesCompleted() {
      def salesCompleted = service.getSalesCompleted()
      if(salesCompleted.count &gt; 0) {
          assertTrue()
      }
      fail "no sales completed"
  }
  }
  </code></pre>
  
  <p>Where is the mistake? The pregenerated *ControllerTests.groovy are working fine with junit runner in eclipse!
  I'm using STS:
  SpringSource Tool Suite </p>
  
  <p>Version: 2.9.2.RELEASE
  Build Id: 201205071000</p>