@SuppressWarnings("deprecation")
    File convertToFile(URL url) {
        String protocol = url.getProtocol();
        if ("file".equals(protocol)) {
            return new File(URLDecoder.decode(url.getFile()));
        } else {
            addInfo("URL [" + url + "] is not of type file");
            return null;
        }
    }
@Test
    // See http://jira.qos.ch/browse/LBCORE-119
    public void fileToURLAndBack() throws MalformedURLException {
        File file = new File("a b.xml");
        URL url = file.toURI().toURL();
        ConfigurationWatchList cwl = new ConfigurationWatchList();
        File back = cwl.convertToFile(url);
        assertEquals(file.getName(), back.getName());
    }