@Test
public void testOnEmptyRepo()
throws Exception
{
final RepositoryRegistry repositoryRegistry = mock(RepositoryRegistry.class);
final TargetRegistry targetRegistry = mock(TargetRegistry.class);
final Repository repository = mock(Repository.class);
final RepositoryKind repositoryKind = mock(RepositoryKind.class);
final MavenRepository mavenRepository = mock(MavenRepository.class);
when(repositoryRegistry.getRepository(REPO_ID)).thenReturn(repository);
when(targetRegistry.getRepositoryTarget(TARGET_ID)).thenReturn(null);
when(repositoryRegistry.getRepository(REPO_ID)).thenReturn(repository);
when(repository.getRepositoryContentClass()).thenReturn(MAVEN_2_CONTENT_CLASS);
when(repository.getLocalStatus()).thenReturn(LocalStatus.IN_SERVICE);
when(repository.getRepositoryKind()).thenReturn(repositoryKind);
when(repositoryKind.isFacetAvailable(ProxyRepository.class)).thenReturn(false);