}
@Test
public void testShouldGetChangesForLatestBuildEvenWhenPreviousBuildsExist()
throws Exception {
AbstractBuild failureBuild = createBuild(Result.FAILURE, 41, "Changes for a failed build.");
AbstractBuild currentBuild = createBuild(Result.SUCCESS, 42, "Changes for a successful build.");
when(currentBuild.getPreviousBuild()).thenReturn(failureBuild);
when(failureBuild.getNextBuild()).thenReturn(currentBuild);
String content = changesSinceLastBuildContent.evaluate(currentBuild, listener, ChangesSinceLastBuildContent.MACRO_NAME);
assertEquals("[Ash Lux] Changes for a successful build.\n\n", content);