private final GradleDistributionLocator gradleDistributionLocatorMock = context.mock(GradleDistributionLocator.class);
private DefaultGradle gradle;
@Before
public void setUp() {
context.checking(new Expectations() {{
one(serviceRegistryFactoryMock).createFor(with(any(DefaultGradle.class)));
will(returnValue(gradleServiceRegistryMock));
allowing(gradleServiceRegistryMock).get(ScriptHandler.class);
will(returnValue(scriptHandlerMock));
allowing(gradleServiceRegistryMock).get(ScriptClassLoaderProvider.class);