public static File createTempFileFromResource(final Class<?> classInSamePackage,
      final String resourceName, final String fileName) {
    URL resource = getResource(classInSamePackage, resourceName);
    return createTempFileFromResource(resource, fileName);
  }
Copies a {@code resourceName} using the {@code ClassLoader} of {@code classInSamePackage} to a
{@code file} in the temporary-file directory.

@param classInSamePackage a class sharing the {@code ClassLoader} from which to retrieve the
       resource
@param resourceName the resource to copy
@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