String actualVersion = ((GradleInterfaceVersion2) singlePane.getGradleInterfaceVersion1()).getVersion();
assertEquals(version, actualVersion);
singlePane.setCurrentDirectory(currentDir);
GradleInterfaceVersion2 gradleInterface = (GradleInterfaceVersion2) singlePane.getGradleInterfaceVersion1();
BlockingRequestObserver testRequestObserver = new BlockingRequestObserver(RequestVersion1.REFRESH_TYPE);
gradleInterface.addRequestObserver(testRequestObserver);
singlePane.aboutToShow();
gradleInterface.refreshTaskTree();
testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS);
assertEquals(String.format("Execution failed%n%s", testRequestObserver.getOutput()), 0, (long) testRequestObserver.getResult());
List<ProjectVersion1> rootProjects = gradleInterface.getRootProjects();
assertTrue(!rootProjects.isEmpty());
ProjectVersion1 rootProject = rootProjects.get(0);
assertEquals(3, rootProject.getSubProjects().size());