when(repositoryKind.isFacetAvailable(HostedRepository.class)).thenReturn(false);
Repository repository = mock(Repository.class);
when(repository.getRepositoryKind()).thenReturn(repositoryKind);
Yum yum = mock(Yum.class);
when(yum.getNexusRepository()).thenReturn(repository);
YumRegistry yumRegistry = mock(YumRegistry.class);
when(yumRegistry.isRegistered(REPO)).thenReturn(true);
when(yumRegistry.get(REPO)).thenReturn(yum);
GenerateMetadataTask task = new GenerateMetadataTask(
mock(EventBus.class),
mock(RepositoryRegistry.class),
yumRegistry,