public static File createFileFromResource(final URL resource, final File targetFolder,
      final String fileName) {
    File targetFile = new File(targetFolder, fileName);
    copyResourceToFile(resource, targetFile);
    return targetFile;
  }
Copies a {@code resource} to a {@code file} in {@code targetFolder}.

@param resource the resource to copy
@param targetFolder the folder in which to create the file
@param fileName the name of the file to create
@return the newly created file

@throws AssertionError if the resource cannot be located

@throws UncheckedIOException if an I/O exception occurs or the file exists but is a directory
        rather than a regular file, does not exist but cannot be created, or cannot be opened
        for any other reason
geode-junit/src/main/java/org/apache/geode/test/util/ResourceUtils.java