String goal = "generate-metadata";
Plugin plugin = new Plugin();
plugin.setGroupId( "org.codehaus.plexus" );
plugin.setArtifactId( "plexus-component-metadata" );
plugin.setVersion( plexusVersion );
<BUG>MojoDescriptor mojoDescriptor = pluginManager.getMojoDescriptor( plugin, goal, session.getCurrentProject(), session.getLocalRepository() );
assertNotNull( mojoDescriptor );</BUG>
assertEquals( "generate-metadata", mojoDescriptor.getGoal() );
assertNotNull( mojoDescriptor.getRealm() );
PluginDescriptor pluginDescriptor = mojoDescriptor.getPluginDescriptor();

String goal = "generate-metadata";
Plugin plugin = new Plugin();
plugin.setGroupId( "org.codehaus.plexus" );
plugin.setArtifactId( "plexus-component-metadata" );
plugin.setVersion( plexusVersion );
MojoDescriptor mojoDescriptor = pluginManager.getMojoDescriptor( plugin, goal, session.getLocalRepository(), session.getCurrentProject().getRemoteArtifactRepositories() );
assertNotNull( mojoDescriptor );
assertEquals( "generate-metadata", mojoDescriptor.getGoal() );
assertNotNull( mojoDescriptor.getRealm() );
PluginDescriptor pluginDescriptor = mojoDescriptor.getPluginDescriptor();
