void () { String home = computeJavaHome(); doCommand("mock-jdk-6" + System.currentTimeMillis(), SimpleJavaSdkType.getInstance(), home); Sdk sdk = ProjectRootManager.getInstance(getProject()).getProjectSdk(); Assert.assertNotNull(sdk); Assert.assertTrue(FileUtil.pathsEqual(sdk.getHomePath(), home)); }