ResourceFactory { protected File getCanonicalFile(String resourceId) throws IOException { return new File(resourceId).getCanonicalFile(); } ResourceFactory(String resourceId); URL getUrl(); Collection<URL> getUrls(); String getResourceId(); @Override String toString();  }
@Test public void testGetCanonicalFile() throws IOException { File file = new ResourceFactory("").getCanonicalFile("./src/test/resources/io/bootique/config/test1.yml"); File expected = new File(System.getProperty("user.dir") + "/src/test/resources/io/bootique/config/test1.yml"); assertEquals(expected, file); }