@Test
public void testWithNoPreviousVersion() {
setupData("no-previous-version");
PastSnapshotFinderByPreviousVersion finder = new PastSnapshotFinderByPreviousVersion(getSession());
Snapshot currentProjectSnapshot = getSession().getSingleResult(Snapshot.class, "id", 1003);
PastSnapshot foundSnapshot = finder.findByPreviousVersion(currentProjectSnapshot);
assertThat(foundSnapshot.getMode()).isEqualTo(CoreProperties.TIMEMACHINE_MODE_PREVIOUS_VERSION);
assertThat(foundSnapshot.getProjectSnapshot()).isNull();
assertThat(foundSnapshot.getModeParameter()).isNull();
}