@Test
public void get_by_key() {
setupData("shared");
SnapshotDto result = sut.getNullableByKey(session, 3L);
assertThat(result).isNotNull();
assertThat(result.getId()).isEqualTo(3L);
assertThat(result.getResourceId()).isEqualTo(3L);
assertThat(result.getRootProjectId()).isEqualTo(1L);
assertThat(result.getParentId()).isEqualTo(2L);
assertThat(result.getRootId()).isEqualTo(1L);
assertThat(result.getStatus()).isEqualTo("P");
assertThat(result.getLast()).isTrue();
assertThat(result.getPurgeStatus()).isEqualTo(1);
assertThat(result.getDepth()).isEqualTo(1);
assertThat(result.getScope()).isEqualTo("DIR");
assertThat(result.getQualifier()).isEqualTo("PAC");
assertThat(result.getVersion()).isEqualTo("2.1-SNAPSHOT");
assertThat(result.getPath()).isEqualTo("1.2.");
assertThat(result.getPeriodMode(1)).isEqualTo("days1");
assertThat(result.getPeriodModeParameter(1)).isEqualTo("30");
assertThat(result.getPeriodDate(1)).isEqualTo(DateUtils.parseDate("2011-09-24"));
assertThat(result.getPeriodMode(2)).isEqualTo("days2");
assertThat(result.getPeriodModeParameter(2)).isEqualTo("31");
assertThat(result.getPeriodDate(2)).isEqualTo(DateUtils.parseDate("2011-09-25"));
assertThat(result.getPeriodMode(3)).isEqualTo("days3");
assertThat(result.getPeriodModeParameter(3)).isEqualTo("32");
assertThat(result.getPeriodDate(3)).isEqualTo(DateUtils.parseDate("2011-09-26"));
assertThat(result.getPeriodMode(4)).isEqualTo("days4");
assertThat(result.getPeriodModeParameter(4)).isEqualTo("33");
assertThat(result.getPeriodDate(4)).isEqualTo(DateUtils.parseDate("2011-09-27"));
assertThat(result.getPeriodMode(5)).isEqualTo("days5");
assertThat(result.getPeriodModeParameter(5)).isEqualTo("34");
assertThat(result.getPeriodDate(5)).isEqualTo(DateUtils.parseDate("2011-09-28"));
assertThat(result.getCreatedAt()).isEqualTo(DateUtils.parseDate("2008-12-02"));
assertThat(result.getBuildDate()).isEqualTo(DateUtils.parseDate("2011-09-29"));
assertThat(sut.getNullableByKey(session, 999L)).isNull();
}