@Override
  public URL getLocalArtifactUrl(DependencyJar dependency) {
    String depShortName = dependency.getShortName();
    String pathStr = properties.getProperty(depShortName);
    if (pathStr != null) {
      if (pathStr.indexOf(File.pathSeparatorChar) != -1) {
        throw new IllegalArgumentException(
            "didn't expect multiple files for " + dependency + ": " + pathStr);
      }

      Path path = baseDir.resolve(Paths.get(pathStr));
      try {
        return path.toUri().toURL();
      } catch (MalformedURLException e) {
        throw new RuntimeException(e);
      }
    } else {
      if (delegate != null) {
        return delegate.getLocalArtifactUrl(dependency);
      }
    }

    throw new RuntimeException("no artifacts found for " + dependency);
  }
@Test
  public void whenAbsolutePathIsProvidedInProperties_shouldReturnFileUrl() throws Exception {
    String absolutePath = cColonBackslash ? "c:\\tmp\\file.jar" : "/tmp/file.jar";
    DependencyResolver resolver =
        new PropertiesDependencyResolver(
            propsFile("com.group:example:1.3", new File(absolutePath).getAbsoluteFile()), mock);

    URL url = resolver.getLocalArtifactUrl(exampleDep);
    if (cColonBackslash) {
      assertThat(url).isEqualTo(Paths.get("c:\\tmp\\file.jar").toUri().toURL());
    } else {
      assertThat(url).isEqualTo(Paths.get("/tmp/file.jar").toUri().toURL());
    }
  }