ProjectMetadata project2 = new ProjectMetadata();
project2.setNamespace( TEST_NAMESPACE );
project2.setId( "project2" );
repository.updateProject( TEST_REPO_ID, project2 );
ArtifactMetadata artifact1 = createArtifact();
artifact1.setProject( "project1" );
repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, "project1", TEST_PROJECT_VERSION, artifact1 );
ArtifactMetadata artifact2 = createArtifact();
artifact2.setProject( "project2" );
repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, "project2", TEST_PROJECT_VERSION, artifact2 );
repository.save();
List<ArtifactMetadata> expected = Arrays.asList( artifact1, artifact2 );
Collections.sort( expected, new ArtifactMetadataComparator() );