import java.io.IOException;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.util.Map;

public class ZipPathCompareTo {

    public static void main(String[] args) throws IOException {
        Path testFile = Path.of("test.zip");
        try (FileSystem zipfs = FileSystems.newFileSystem(testFile, Map.of("create", true))) {
            zipfs.getPath("hello").compareTo(testFile);
        } catch (ClassCastException ex) {
            // expected outcome, successful program termination
        }
    }
}
