Organization org = new Organization();
org.setName( "org name" );
org.setUrl( "url" );
metadata.setOrganization( org );
License l = new License();
l.setName( "license name" );
l.setUrl( "license url" );
metadata.addLicense( l );
Dependency d = new Dependency();
d.setArtifactId( "artifactId" );
d.setClassifier( "classifier" );
d.setGroupId( "groupId" );
d.setScope( "scope" );
d.setSystemPath( "system path" );
d.setType( "type" );
d.setVersion( "version" );
d.setOptional( true );
metadata.addDependency( d );
repository.updateProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, metadata );
metadata = repository.getProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION );
assertEquals( TEST_PROJECT_VERSION, metadata.getId() );
assertEquals( TEST_PROJECT_VERSION, metadata.getVersion() );
assertEquals( "project name", metadata.getName() );
assertEquals( "project description", metadata.getDescription() );
assertEquals( "the url", metadata.getUrl() );
assertEquals( "connection", metadata.getScm().getConnection() );
assertEquals( "dev conn", metadata.getScm().getDeveloperConnection() );
assertEquals( "url", metadata.getScm().getUrl() );
assertEquals( "system", metadata.getCiManagement().getSystem() );
assertEquals( "ci url", metadata.getCiManagement().getUrl() );
assertEquals( "system", metadata.getIssueManagement().getSystem() );
assertEquals( "issue tracker url", metadata.getIssueManagement().getUrl() );
assertEquals( "org name", metadata.getOrganization().getName() );
assertEquals( "url", metadata.getOrganization().getUrl() );
assertEquals( 1, metadata.getMailingLists().size() );
MailingList retrievedMailingList = metadata.getMailingLists().get( 0 );
assertEquals( mailingList.getName(), retrievedMailingList.getName() );
assertEquals( mailingList.getMainArchiveUrl(), retrievedMailingList.getMainArchiveUrl() );
assertEquals( mailingList.getPostAddress(), retrievedMailingList.getPostAddress() );
assertEquals( mailingList.getSubscribeAddress(), retrievedMailingList.getSubscribeAddress() );
assertEquals( mailingList.getUnsubscribeAddress(), retrievedMailingList.getUnsubscribeAddress() );
assertThat( retrievedMailingList.getOtherArchives() ) //
.isNotNull() //
.isNotEmpty() //
.hasSize( 1 ) //
.contains( "other archive" );
assertEquals( 1, metadata.getLicenses().size() );
l = metadata.getLicenses().get( 0 );
assertEquals( "license name", l.getName() );
assertEquals( "license url", l.getUrl() );
assertEquals( 1, metadata.getDependencies().size() );
d = metadata.getDependencies().get( 0 );
assertEquals( "artifactId", d.getArtifactId() );
assertEquals( "classifier", d.getClassifier() );