System.out.println( "mojoAnnotatedClasses:" + mojoAnnotatedClasses );
Assertions.assertThat( mojoAnnotatedClasses ).isNotNull().isNotEmpty().hasSize( 1 );
MojoAnnotatedClass mojoAnnotatedClass = mojoAnnotatedClasses.values().iterator().next();
assertEquals( FooMojo.class.getName(), mojoAnnotatedClass.getClassName() );
assertEquals( AbstractMojo.class.getName(), mojoAnnotatedClass.getParentClassName() );
Mojo mojo = mojoAnnotatedClass.getMojo();
assertEquals( "foo", mojo.name() );
assertEquals( true, mojo.threadSafe() );
assertEquals( false, mojo.aggregator() );
assertEquals( LifecyclePhase.COMPILE, mojo.defaultPhase() );
Execute execute = mojoAnnotatedClass.getExecute();
assertEquals( "compiler", execute.goal() );
assertEquals( "my-lifecycle", execute.lifecycle() );
assertEquals( LifecyclePhase.PACKAGE, execute.phase() );
Collection<ComponentAnnotationContent> components = mojoAnnotatedClass.getComponents().values();
Assertions.assertThat( components ).isNotNull().isNotEmpty().hasSize( 2 );
Collection<ParameterAnnotationContent> parameters = mojoAnnotatedClass.getParameters().values();
Assertions.assertThat( parameters ).isNotNull().isNotEmpty().hasSize( 2 ).contains(
new ParameterAnnotationContent( "bar", null, "thebar", "coolbar", true, false, String.class.getName() ),
new ParameterAnnotationContent( "beer", null, "thebeer", "coolbeer", false, false,
String.class.getName() ) );
}