PluginExecution parentExecution2 = new PluginExecution();
parentExecution2.setId( "testExecution" );
parentPlugin2.addExecution( parentExecution2 );
PluginContainer parentContainer = new PluginContainer();
parentContainer.addPlugin(parentPlugin1);
parentContainer.addPlugin(parentPlugin2);
Plugin childPlugin1 = new Plugin();
childPlugin1.setArtifactId( "testArtifact" );
childPlugin1.setGroupId( "bbb" );
childPlugin1.setVersion( "1.0" );
PluginExecution childExecution1 = new PluginExecution();
childExecution1.setId( "testExecution" );
childPlugin1.addExecution( childExecution1 );
Plugin childPlugin2 = new Plugin();
childPlugin2.setArtifactId( "testArtifact" );
childPlugin2.setGroupId( "aaa" );
childPlugin2.setVersion( "1.0" );
PluginExecution childExecution2 = new PluginExecution();
childExecution2.setId( "testExecution" );
childPlugin2.addExecution( childExecution2 );
PluginContainer childContainer = new PluginContainer();
childContainer.addPlugin(childPlugin1);
childContainer.addPlugin(childPlugin2);
ModelUtils.mergePluginLists(childContainer, parentContainer, true);
assertEquals( 4, childContainer.getPlugins().size() );
assertSame(parentPlugin1, childContainer.getPlugins().get(0));
assertSame(parentPlugin2, childContainer.getPlugins().get(1));
assertSame(childPlugin1, childContainer.getPlugins().get(2));
assertSame(childPlugin2, childContainer.getPlugins().get(3));
}