throws Exception
{
Properties props = new Properties();
InvokerProperties facade = new InvokerProperties( props );
InvocationRequest request = new DefaultInvocationRequest();
request.setGoals( Collections.singletonList( "test" ) );
facade.configureInvocation( request, 0 );
assertEquals( Collections.singletonList( "test" ), request.getGoals() );
props.setProperty( "invoker.goals", "verify" );
facade.configureInvocation( request, 0 );
assertEquals( Collections.singletonList( "verify" ), request.getGoals() );
props.setProperty( "invoker.goals", " " );
facade.configureInvocation( request, 0 );
assertEquals( Arrays.asList( new String[0] ), request.getGoals() );
props.setProperty( "invoker.goals", " clean , test verify " );
facade.configureInvocation( request, 0 );
assertEquals( Arrays.asList( new String[] { "clean", "test", "verify" } ), request.getGoals() );
props.setProperty( "invoker.goals", "" );
facade.configureInvocation( request, 0 );
assertEquals( Arrays.asList( new String[0] ), request.getGoals() );
}