private static void disableCaching(Path path) throws IOException {
        // This function is a workaround for a Java 8 caching bug. When Java 8 support is dropped it may be removed.
        // This test runs the sync-manifests command, and _without stopping the jvm_ executes a list command.
        // Under normal use, the sync-manifests command is followed immediately by a JVM shutdown, clearing caches.
        // The Java 8 ServiceLoader does not disable the URLConnection caching, so doesn't read some previous writes.
        // Java 9+ ServiceLoaders disable the URLConnection caching, so don't need this patch (it becomes a no-op)
        path.toUri().toURL().openConnection().setDefaultUseCaches(false);
    }
Populate a writable disk path to be usable as a single plugin location.
The returned path will be usable as a single path.
@param path A non-existent path immediately within a writable directory, suggesting a location for this plugin.
@param type The format to which the on-disk plugin should conform
@param plugin The plugin which should be written to the specified path
@return The final usable path name to this location, in case it is different from the suggested input path.
tools/src/test/java/org/apache/kafka/tools/ConnectPluginPathTest.java