boolean (@NotNull SdkType sdkType, @NotNull Consumer<? super String> consumer) { if (ApplicationManager.getApplication().isUnitTestMode()) { Sdk sdk = ProjectJdkTable.getInstance().findMostRecentSdkOfType(sdkType); if (sdk == null) throw new RuntimeException("No SDK of type " + sdkType + " found"); consumer.consume(sdk.getHomePath()); return true; } return false; }