static Optional<File> getFileFromURL(URL retrieved) {
        logger.debug("getFileFromURL {}", retrieved);
        logger.debug("retrieved.getProtocol() {}", retrieved.getProtocol());
        if (logger.isDebugEnabled()) {
            debugURLContent(retrieved);
        }
        logger.debug("retrieved.getPath() {}", retrieved.getPath());
        switch (retrieved.getProtocol()) {
            case "jar":
                return getOptionalFileFromJar(retrieved);
            case "resource":
                return  getOptionalFileFromResource(retrieved);
            default:
                return getOptionalFileFromURLFile(retrieved);
        }
    }
@Test
    void getFileFromURL() throws IOException {
        URL url = getJarUrl();
        assertThat(url).isNotNull();
        Optional<File> retrieved = MemoryFileUtils.getFileFromURL(url);
        assertThat(retrieved).isNotNull().isPresent();
        assertThat(retrieved.get()).isInstanceOf(MemoryFile.class);
        assertThat(retrieved.get()).canRead();

        url = getResourceUrl();
        assertThat(url).isNotNull();
        retrieved = MemoryFileUtils.getFileFromURL(url);
        assertThat(retrieved).isNotNull().isPresent();
        assertThat(retrieved.get()).isInstanceOf(File.class);
        assertThat(retrieved.get()).canRead();
    }