### Question:
ExternalNativeBuildTaskUtils { @VisibleForTesting @NonNull static File doFindCmakeExecutableFolder( @Nullable String cmakeVersion, @NonNull SdkHandler sdkHandler, @NonNull List<File> foldersToSearch) { if (sdkHandler.getCmakePathInLocalProp() != null) { return sdkHandler.getCmakePathInLocalProp(); } if (cmakeVersion != null && !isDefaultSdkCmakeVersion(cmakeVersion)) { File cmakeFolder = getRequiredCmakeFromFolders( Revision.parseRevision(cmakeVersion), foldersToSearch); return new File(cmakeFolder.getParent()); } return getCmakeFolderFromSdkPackage(sdkHandler); }  static boolean fileIsUpToDate(@NonNull File source, @NonNull File derived); @NonNull static File getJsonMiniConfigFile(@NonNull File originalJson); @NonNull static File getOutputJson(@NonNull File jsonFolder, @NonNull String abi); @NonNull static File getCompileCommandsJson(@NonNull File jsonFolder, @NonNull String abi); @NonNull static List<File> getOutputJsons(@NonNull File jsonFolder,
            @NonNull Collection<String> abis); static boolean isExternalNativeBuildEnabled(@NonNull CoreExternalNativeBuild config); @NonNull static ExternalNativeBuildProjectPathResolution getProjectPath(
            @NonNull CoreExternalNativeBuild config); @NonNull static File findCmakeExecutableFolder(
            @NonNull String cmakeVersion, @NonNull SdkHandler sdkHandler); static final String CUSTOM_FORK_CMAKE_VERSION; }### Answer:
@Test public void testCMakeFolderFromSdkHandler() { File expectedCmakeFolder = new File(sdkFolder, "cmake"); Mockito.when(sdkHandler.getCmakePathInLocalProp()).thenReturn(expectedCmakeFolder); File actualReturn = ExternalNativeBuildTaskUtils.doFindCmakeExecutableFolder(null, sdkHandler, null); assertThat(actualReturn).isEqualTo(expectedCmakeFolder); }
@Test public void testCMakeFolderFromFoldersToSearch() { Mockito.when(sdkHandler.getCmakePathInLocalProp()).thenReturn(null); Mockito.when(sdkHandler.getSdkFolder()).thenReturn(sdkFolder); for (File file : FileUtils.getAllFiles(new File(sdkFolder, "cmake"))) { if (!file.getName().equals(CMAKE_FILE_NAME) || !file.canExecute()) { continue; } File cmakeBinFolder = new File(file.getParent()); File expectedCmakeFolder = new File(cmakeBinFolder.getParent()); List<File> fileListToSearch = new ArrayList<>(); fileListToSearch.add(new File(cmakeBinFolder.getAbsolutePath())); File actualReturn = ExternalNativeBuildTaskUtils.doFindCmakeExecutableFolder( getInstalledCmakeVersion(cmakeBinFolder), sdkHandler, fileListToSearch); assertThat(actualReturn).isEqualTo(expectedCmakeFolder); } }