public void testDuplicate2()
throws Exception
{
File testPom =
new File( getBasedir(), "target/test-classes/unit/duplicate-dependencies/plugin-config2.xml" );
AnalyzeDuplicateMojo mojo = (AnalyzeDuplicateMojo) lookupMojo( "analyze-duplicate", testPom );
assertNotNull( mojo );
DuplicateLog log = new DuplicateLog();
mojo.setLog( log );
mojo.execute();
assertTrue( log.getContent().indexOf(
"List of duplicate dependencies defined in <dependencyManagement/> in "
+ "your pom.xml" ) != -1 );
assertTrue( log.getContent().indexOf( "junit:junit:jar" ) != -1 );