@Test
 public void getRepositoriesFromSettings() throws MalformedURLException {
   PropertyResolver propertyResolver = createMock(PropertyResolver.class);
   expect(propertyResolver.get("org.ops4j.pax.url.mvn.localRepository")).andReturn(null);
   expect(propertyResolver.get("org.ops4j.pax.url.mvn.settings")).andReturn(null);
   expect(propertyResolver.get("org.ops4j.pax.url.mvn.useFallbackRepositories")).andReturn(null);
   expect(propertyResolver.get("org.ops4j.pax.url.mvn.repositories")).andReturn(null);
   expect(propertyResolver.get("org.ops4j.pax.url.mvn.defaultLocalRepoAsRemote")).andReturn(null);
   Settings settings = settingsForRepository("repository1", "file:repository1");
   replay(propertyResolver);
   MavenConfigurationImpl config = new MavenConfigurationImpl(propertyResolver, PID);
   config.setSettings(settings);
   List<MavenRepositoryURL> repositories = config.getRepositories();
   assertNotNull("Repositories is null", repositories);
   assertEquals("Repositories size", 1, repositories.size());
   assertEquals("Repository", new URL("file:repository1/"), repositories.get(0).getURL());
   verify(propertyResolver);
 }
 @Test
 public void getLocalRepositoryFromSettings() throws MalformedURLException {
   PropertyResolver propertyResolver = createMock(PropertyResolver.class);
   expect(propertyResolver.get("org.ops4j.pax.url.mvn.localRepository"))
       .andReturn(null)
       .atLeastOnce();
   expect(propertyResolver.get("org.ops4j.pax.url.mvn.settings")).andReturn(null);
   expect(propertyResolver.get("org.ops4j.pax.url.mvn.useFallbackRepositories")).andReturn(null);
   Settings settings = createMock(Settings.class);
   expect(settings.getLocalRepository()).andReturn("file:somewhere/localrepository/");
   replay(propertyResolver, settings);
   MavenConfigurationImpl config = new MavenConfigurationImpl(propertyResolver, PID);
   config.setSettings(settings);
   assertEquals(
       "Local repository",
       new URL("file:somewhere/localrepository/"),
       config.getLocalRepository().getURL());
   verify(propertyResolver, settings);
 }