public static URL getResourceUrl(String resource) throws IOException {
        if (resource.startsWith(CLASSPATH_PREFIX)) {
            String path = resource.substring(CLASSPATH_PREFIX.length());
            
            ClassLoader classLoader = ResourceUtils.class.getClassLoader();
            
            URL url = (classLoader != null ? classLoader.getResource(path) : ClassLoader.getSystemResource(path));
            if (url == null) {
                throw new FileNotFoundException("Resource [" + resource + "] does not exist");
            }
            
            return url;
        }
        
        try {
            return new URL(resource);
        } catch (MalformedURLException ex) {
            return new File(resource).toURI().toURL();
        }
    }
@Test
    void testGetResourceUrlFromSystemLoader() throws IOException {
        URL url = ResourceUtils.getResourceUrl(null, "test-tls-cert.pem");
        assertNotNull(url);
    }