// create a third project and make sure it's not picked up by search
FreeStyleProject project3 = createFreeStyleProject(project3Name);
project3.setDisplayName(project3DisplayName);
// search for foo
Page result = search(project1Name);
Assert.assertNotNull(result);
assertGoodStatus(result);
// make sure we get the project with the name foo
String contents = result.getWebResponse().getContentAsString();
Assert.assertTrue(contents.contains(String.format("<title>%s [Jenkins]</title>", project1DisplayName)));
// make sure projects 2 and 3 were not picked up
Assert.assertFalse(contents.contains(project2Name));
Assert.assertFalse(contents.contains(project3Name));
Assert.assertFalse(contents.contains(project3DisplayName));