@Test
public void testGetArtifactsByRepoIdMultipleCopies()
throws Exception
{
ArtifactMetadata artifact = createArtifact();
repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, artifact );
ArtifactMetadata secondArtifact = createArtifact();
secondArtifact.setRepositoryId( OTHER_REPO_ID );
repository.updateArtifact( OTHER_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, secondArtifact );
repository.save();
// test it restricts to the appropriate repository
assertEquals( Collections.singletonList( artifact ), repository.getArtifacts( TEST_REPO_ID ) );