@Test
public void testHealthReportSingleRepoByCorrectGroupIdAllRepositories()
throws Exception
{
RepositoryProblemFacet problem1 = createProblem( GROUP_ID, "artifactId", INTERNAL );
RepositoryProblemFacet problem2 = createProblem( GROUP_ID, "artifactId-2", SNAPSHOTS );
metadataRepositoryControl.expectAndReturn(
metadataRepository.getMetadataFacets( INTERNAL, RepositoryProblemFacet.FACET_ID ),
Arrays.asList( problem1.getName() ) );
metadataRepositoryControl.expectAndReturn(
metadataRepository.getMetadataFacets( SNAPSHOTS, RepositoryProblemFacet.FACET_ID ),
Arrays.asList( problem2.getName() ) );
metadataRepositoryControl.expectAndReturn(
metadataRepository.getMetadataFacet( INTERNAL, RepositoryProblemFacet.FACET_ID, problem1.getName() ),
problem1 );
metadataRepositoryControl.expectAndReturn(
metadataRepository.getMetadataFacet( SNAPSHOTS, RepositoryProblemFacet.FACET_ID, problem2.getName() ),
problem2 );
metadataRepositoryControl.replay();
action.setGroupId( GROUP_ID );
action.setRepositoryId( GenerateReportAction.ALL_REPOSITORIES );