@Test public void shouldScanRepository() throws Exception { final MavenRepository repository = mock(MavenRepository.class); when(repository.getId()).thenReturn(REPO_ID); when(repository.getLocalUrl()).thenReturn(rpmsDir().toURI().toASCIIString()); final RepositoryKind repositoryKind = mock(RepositoryKind.class); when(repository.getRepositoryKind()).thenReturn(repositoryKind); when(repositoryKind.isFacetAvailable(HostedRepository.class)).thenReturn(true); yumRegistry.register(repository); waitForAllTasksToBeDone(); Assert.assertNotNull(yumRegistry.get(REPO_ID)); }