### Question:
DefaultRemoteRepositoryConfigDao implements
        RemoteRepositoryConfigDao { @Override public RemoteRepositoryDefinition getRepositoryById(String repositoryID) { RemoteRepositoryDefinition result = null; for (RemoteRepositoryDefinition repository : this.getAllRepositories()) { if (repositoryID.equals(repository.getRepositoryId())) { return repository; } } return result; } DefaultRemoteRepositoryConfigDao(Resource configResource); @Override void loadConfiguration(); @Override Resource getConfigResource(); @Override void setConfigResource(Resource configResource); @Override String getJasperReportsVersion(); @Override Boolean isRepositoryActive(String repositoryID); @Override URI getURI(String repositoryID); @Override String getLoginUser(String repositoryID); @Override String getLoginRepoPassword(String repositoryID); @Override String getRepositoryName(String repositoryID); @Override String getRepositoryDescription(String repositoryID); @Override String getRepositoryManagementURL(String repositoryID); @Override List<RemoteRepositoryDefinition> getAllRepositories(); @Override List<RemoteRepositoryDefinition> getActiveRepositories(); @Override RemoteRepositoryDefinition getRepositoryById(String repositoryID);  }### Answer:
@Test public void testGetRepositoryById() throws Exception { assertEquals("Get CIO remote repository by ID", "cioreporting", m_remoteRepositoryConfigDao.getRepositoryById("cioreporting").getRepositoryId()); assertEquals("Get CONNECT remote repository by ID", "connectreporting", m_remoteRepositoryConfigDao.getRepositoryById("connectreporting").getRepositoryId()); }