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