testngOptionsMock = context.mock(TestNGOptions.class);
idGeneratorMock = context.mock(IdGenerator.class);
serviceRegistry = context.mock(ServiceRegistry.class);
final JavaVersion sourceCompatibility = JavaVersion.VERSION_1_5;
context.checking(new Expectations() {{
allowing(projectMock).getProjectDir(); will(returnValue(new File("projectDir")));
allowing(projectMock).property("sourceCompatibility"); will(returnValue(sourceCompatibility));
allowing(testMock).getTestClassesDir();will(returnValue(testClassesDir));
allowing(testMock).getClasspath();will(returnValue(classpathMock));