DistributionManagement distributionManagement = new DistributionManagement();
distributionManagement.setDownloadUrl( "downloadUrl" );
distributionManagement.setRelocation( new Relocation() );
distributionManagement.setStatus( "deployed" );
DeploymentRepository repository = new DeploymentRepository();
repository.setId( "apache.releases" );
repository.setUrl( "scp://minotaur.apache.org/www/www.apache.org/dist/java-repository" );
repository.setName( "name" );
repository.setLayout( "legacy" );
distributionManagement.setRepository( repository );
DeploymentRepository snapshotRepository = new DeploymentRepository();
snapshotRepository.setId( "apache.snapshots" );
snapshotRepository.setUrl( "scp://minotaur.apache.org/www/cvs.apache.org/repository" );
snapshotRepository.setName( "name" );
snapshotRepository.setLayout( "legacy" );
snapshotRepository.setUniqueVersion( false );
distributionManagement.setSnapshotRepository( snapshotRepository );
Site site = new Site();
site.setId( "apache.website" );
site.setUrl( "scp://minotaur.apache.org/www/maven.apache.org/" );
site.setName( "name3" );
distributionManagement.setSite( site );
parent.setDistributionManagement( distributionManagement );
assembler.assembleModelInheritance( child, parent );
DistributionManagement childDistMgmt = child.getDistributionManagement();
assertNotNull( "Check distMgmt inherited", childDistMgmt );
assertNull( "Check status NOT inherited", childDistMgmt.getStatus() );
assertNull( "Check relocation NOT inherited", childDistMgmt.getRelocation() );
assertEquals( "Check downloadUrl inherited", distributionManagement.getDownloadUrl(),
childDistMgmt.getDownloadUrl() );
Site childSite = childDistMgmt.getSite();
assertNotNull( "Check site inherited", childSite );
assertEquals( "Check id matches", site.getId(), childSite.getId() );
assertEquals( "Check name matches", site.getName(), childSite.getName() );
assertEquals( "Check url matches with appended path", site.getUrl() + "child", childSite.getUrl() );
assertRepositoryBase( childDistMgmt.getRepository(), repository );
assertRepositoryBase( childDistMgmt.getSnapshotRepository(), snapshotRepository );
assertEquals( "Check uniqueVersion is inherited", snapshotRepository.isUniqueVersion(),
childDistMgmt.getSnapshotRepository().isUniqueVersion() );
}