List<RecipientProvider> recProviders = Collections.emptyList();
PreBuildTrigger trigger = new PreBuildTrigger(recProviders, "$DEFAULT_RECIPIENTS",
"$DEFAULT_REPLYTO", "$DEFAULT_SUBJECT", "$DEFAULT_CONTENT", "", 0, "project");
addEmailType( trigger );
publisher.getConfiguredTriggers().add( trigger );
MatrixBuild build = project.scheduleBuild2(0).get();
j.assertBuildStatusSuccess(build);
assertThat( "Email should have been triggered, so we should see it in the logs.", build.getLog( 100 ),
hasItems( "Email was triggered for: " + PreBuildTrigger.TRIGGER_NAME ) );
assertEquals( 1, Mailbox.get( "solganik@gmail.com" ).size() );
}