@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 whenRelativePathIsProvidedInProperties_shouldReturnFileUrl() throws Exception {
    DependencyResolver resolver =
        new PropertiesDependencyResolver(
            propsFile("com.group:example:1.3", new File("path", "1")), mock);

    URL url = resolver.getLocalArtifactUrl(exampleDep);
    assertThat(url)
        .isEqualTo(temporaryFolder.getRoot().toPath().resolve("path").resolve("1").toUri().toURL());
  }