MemoryImprint memoryImprint = mock(MemoryImprint.class);
when(memoryImprint.getEvent()).thenReturn(event);
when(memoryImprint.wereAllBuildsSuccessful()).thenReturn(true);
when(memoryImprint.wereAnyBuildsFailed()).thenReturn(false);
when(memoryImprint.wereAnyBuildsUnstable()).thenReturn(false);
MemoryImprint.Entry[] entries = { Setup.createImprintEntry(project, r) };
when(memoryImprint.getEntries()).thenReturn(entries);
assertThat("Event should be a ChangeBasedEvent", event, instanceOf(ChangeBasedEvent.class));