MultiRepositoryManager { public void addRepositoryToFile(List<RepositoryProperties> repositories) { IRepository repo = RepositoryFactory.getRepository(); if (!(repo instanceof MultiRepository)) { initializeRepositoryListForMultiRepositoryAndReconfigureFactory(repositories); repo = RepositoryFactory.getRepository(); } ((MultiRepository) repo).addRepositoryToFile(repositories); }  List<RepositoryProperties> getRepositoriesAsList(); void addRepositoryToFile(List<RepositoryProperties> repositories);  }
@Test public void testRepositoryListImport() throws UnsupportedEncodingException { ArrayList<RepositoryProperties> repositoryList = new ArrayList<>(); repositoryList.add(new RepositoryProperties("mainTestRepository", "https: repositoryList.add(new RepositoryProperties("standardTestRepository", "https: MultiRepositoryManager multiRepositoryManager = new MultiRepositoryManager(); multiRepositoryManager.addRepositoryToFile(repositoryList); try { assertTrue(Paths.get(Environments.getInstance().getRepositoryConfig().getRepositoryRoot(), URLEncoder.encode("https: assertTrue(Paths.get(Environments.getInstance().getRepositoryConfig().getRepositoryRoot(), URLEncoder.encode("https: assertTrue(Paths.get(Environments.getInstance().getRepositoryConfig().getRepositoryRoot(), URLEncoder.encode("https: assertTrue(Paths.get(Environments.getInstance().getRepositoryConfig().getRepositoryRoot(), URLEncoder.encode("https: } catch (UnsupportedEncodingException e) { LOGGER.error("Error while encoding."); throw e; } }