FreeStyleProject project = setupProject("master", false);
// create initial commit and then run the build against it:
final String commitFile1 = "commitFile1";
commit(commitFile1, johnDoe, janeDoe, "Commit number 1");
final FreeStyleBuild firstBuild = build(project, Result.SUCCESS, commitFile1);
assertFalse("scm polling should not detect any more changes after build", project.pollSCMChanges(listener));
final String commitFile2 = "commitFile2";
commit(commitFile2, johnDoe, janeDoe, "Commit number 2");
assertTrue("scm polling did not detect commit2 change", project.pollSCMChanges(listener));
final FreeStyleBuild secondBuild = build(project, Result.SUCCESS, commitFile2);
assertFalse("scm polling should not detect any more changes after build", project.pollSCMChanges(listener));
final Set<User> secondCulprits = secondBuild.getCulprits();
assertEquals("The build should have only one culprit", 1, secondCulprits.size());
assertEquals("Did not get the committer as the change author with authorOrCommiter==false",
janeDoe.getName(), secondCulprits.iterator().next().getFullName());
}