Project project = makeStubProject( "Test Project" );
project.setGroupId( "com.example" );
BuildResult build = makeBuild( ContinuumProjectState.ERROR );
MessageContext context = new MessageContext();
context.setProject( project );
context.setBuildResult( build );
List<ProjectNotifier> projectNotifiers = new ArrayList<ProjectNotifier>();
ProjectNotifier pn1 = new ProjectNotifier();
pn1.setType( "mail" );
Map<String, String> config1 = new HashMap<String, String>();
config1.put( MailContinuumNotifier.ADDRESS_FIELD, "foo@example.com" );
pn1.setConfiguration( config1 );
projectNotifiers.add( pn1 );
ProjectNotifier pn2 = new ProjectNotifier();
pn2.setType( "mail" );
Map<String, String> config2 = new HashMap<String, String>();
config2.put( MailContinuumNotifier.ADDRESS_FIELD, "bar@example.com" );
pn2.setConfiguration( config2 );
projectNotifiers.add( pn2 );
context.setNotifier( projectNotifiers );
Notifier notifier = (Notifier) lookup( Notifier.class.getName(), "mail" );
( (MailContinuumNotifier) notifier ).setBuildHost( "foo.bar.com" );