DynamicRepositoryLocationLoader implements RepositoryLocationLoader { @Override public void saveRepositories(List<RepositoryLocation<? extends Repository>> repositoryLocations) { delegated.saveRepositories(repositoryLocations); } DynamicRepositoryLocationLoader(ApplicationContext applicationContext, String beanName);  DynamicRepositoryLocationLoader(RepositoryLocationLoader repositoryLocationLoader); @Override List<RepositoryLocation<? extends Repository>> getDefaultRepositoryLocations(); @Override List<RepositoryLocation<? extends Repository>> loadRepositoryLocations(); @Override void saveRepositories(List<RepositoryLocation<? extends Repository>> repositoryLocations);  }
@Test public void saveRepositories() { final List<RepositoryLocation<? extends Repository>> mockRepositoriesToBeSaved = Arrays.asList( mock(RepositoryLocation.class), mock(RepositoryLocation.class)); mockDelegated.saveRepositories(mockRepositoriesToBeSaved); verify(mockDelegated).saveRepositories(mockRepositoriesToBeSaved); }