@@ -0,0 +1,4024 @@
+package org.synyx.urlaubsverwaltung.application.dao;%0A%0Aimport org.junit.jupiter.api.Test;%0Aimport org.synyx.urlaubsverwaltung.application.web.HolidayReplacementDto;%0Aimport org.synyx.urlaubsverwaltung.department.Department;%0Aimport org.synyx.urlaubsverwaltung.person.Person;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport static org.synyx.urlaubsverwaltung.application.dao.HolidayReplacementEntity.from;%0A%0Aclass HolidayReplacementEntityTest %7B%0A%0A    @Test%0A    void ensuresConvertingDtoToEntity() %7B%0A        final Person holidayReplacement = new Person();%0A%0A        final HolidayReplacementDto holidayReplacementDto = new HolidayReplacementDto();%0A        holidayReplacementDto.setPerson(holidayReplacement);%0A        holidayReplacementDto.setNote(%22some note to the holiday replacement%22);%0A%0A        final HolidayReplacementEntity holidayReplacementEntity = from(holidayReplacementDto);%0A        assertThat(holidayReplacementEntity.getPerson()).isEqualTo(holidayReplacement);%0A        assertThat(holidayReplacementEntity.getNote()).isEqualTo(%22some note to the holiday replacement%22);%0A    %7D%0A%0A    @Test%0A    void ensureEquals() %7B%0A%0A        final Person holidayReplacement = new Person();%0A        final HolidayReplacementEntity holidayReplacementEntity = new HolidayReplacementEntity();%0A        holidayReplacementEntity.setPerson(holidayReplacement);%0A        holidayReplacementEntity.setNote(%22first Note%22);%0A%0A        final HolidayReplacementEntity sameHolidayReplacementEntity = new HolidayReplacementEntity();%0A        sameHolidayReplacementEntity.setPerson(holidayReplacement);%0A        sameHolidayReplacementEntity.setNote(%22first Note%22);%0A%0A        final Person otherHolidayReplacement = new Person();%0A        final HolidayReplacementEntity holidayReplacementEntityOtherPerson = new HolidayReplacementEntity();%0A        holidayReplacementEntityOtherPerson.setPerson(otherHolidayReplacement);%0A        holidayReplacementEntityOtherPerson.setNote(%22first Note%22);%0A%0A        final HolidayReplacementEntity holidayReplacementEntityOtherNote = new HolidayReplacementEntity();%0A        holidayReplacementEntityOtherNote.setPerson(holidayReplacement);%0A        holidayReplacementEntityOtherNote.setNote(%22second Note%22);%0A%0A        assertThat(holidayReplacementEntity)%0A            .isEqualTo(holidayReplacementEntity)%0A            .isEqualTo(sameHolidayReplacementEntity)%0A            .isNotEqualTo(null)%0A            .isNotEqualTo(new Object())%0A            .isNotEqualTo(otherHolidayReplacement)%0A            .isNotEqualTo(holidayReplacementEntityOtherNote);%0A    %7D%0A%0A    @Test%0A    void ensureHashCode() %7B%0A%0A        final Person holidayReplacement = new Person();%0A        final HolidayReplacementEntity holidayReplacementEntity = new HolidayReplacementEntity();%0A        holidayReplacementEntity.setPerson(holidayReplacement);%0A        holidayReplacementEntity.setNote(%22first Note%22);%0A%0A        final HolidayReplacementEntity sameHolidayReplacementEntity = new HolidayReplacementEntity();%0A        sameHolidayReplacementEntity.setPerson(holidayReplacement);%0A        sameHolidayReplacementEntity.setNote(%22first Note%22);%0A%0A        final Person otherHolidayReplacement = new Person();%0A        final HolidayReplacementEntity holidayReplacementEntityOtherPerson = new HolidayReplacementEntity();%0A        holidayReplacementEntityOtherPerson.setPerson(otherHolidayReplacement);%0A        holidayReplacementEntityOtherPerson.setNote(%22first Note%22);%0A%0A        final HolidayReplacementEntity holidayReplacementEntityOtherNote = new HolidayReplacementEntity();%0A        holidayReplacementEntityOtherNote.setPerson(holidayReplacement);%0A        holidayReplacementEntityOtherNote.setNote(%22second Note%22);%0A%0A        assertThat(holidayReplacementEntity.hashCode())%0A            .isEqualTo(holidayReplacementEntity.hashCode())%0A            .isEqualTo(sameHolidayReplacementEntity.hashCode())%0A            .isNotEqualTo(otherHolidayReplacement.hashCode())%0A            .isNotEqualTo(new Object().hashCode())%0A            .isNotEqualTo(holidayReplacementEntityOtherNote.hashCode());%0A    %7D%0A%7D%0A

Add tests for HolidayReplacementEntityTest