Repository: urlaubsverwaltung/urlaubsverwaltung
Pull request #5186 (2025-02-21 12:16:40)

Convert classes to records
<!--

Thanks for contributing to the Urlaubsverwaltung.
Please review the following notes before submitting you pull request.

Please look for other issues or pull requests which already work on this topic. Is somebody already on it? Do you need to synchronize?

# Security Vulnerabilities

🛑 STOP! 🛑 If your contribution fixes a security vulnerability, please do not submit it.
Instead, please open a report of a security vulnerability via
[Report a security vulnerability](https://github.com/urlaubsverwaltung/urlaubsverwaltung/security/advisories/new)


# Describing Your Changes

If, having reviewed the notes above, you're ready to submit your pull request, please
provide a brief description of the proposed changes.

If they:
 🐞 fix a bug, please describe the broken behaviour and how the changes fix it.
    Please label with 'type: bug' and 'status: new'
    
 🎁 make an enhancement, please describe the new functionality and why you believe it's useful.
    Please label with 'type: enhancement' and 'status: new'
 
If your pull request relates to any existing issues,
please reference them by using the issue number prefixed with #.

-->


sonarqubecloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [98.6% Coverage on New Code](https://sonarcloud.io/component_measures?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186)


sonarqubecloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [98.7% Coverage on New Code](https://sonarcloud.io/component_measures?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186)


sonarqubecloud[bot]: ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186) **Quality Gate failed**  
Failed conditions  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [77.9% Coverage on New Code](https://sonarcloud.io/component_measures?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186&metric=new_coverage&view=list) (required ≥ 80%)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=urlaubsverwaltung_urlaubsverwaltung&pullRequest=5186)



Patch:
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsenceApiController.java b/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsenceApiController.java
index f611e585d..8b4ba266a 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsenceApiController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsenceApiController.java
@@ -127,7 +127,7 @@ public class AbsenceApiController {
     }
 
     private Stream<AbsenceDto> toAbsenceDto(AbsencePeriod absence) {
-        return absence.getAbsenceRecords().stream()
+        return absence.absenceRecords().stream()
             .map(this::toAbsenceDto)
             .flatMap(List::stream);
     }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsencePeriod.java b/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsencePeriod.java
index 68071fea3..c133d1b3d 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsencePeriod.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsencePeriod.java
@@ -19,7 +19,9 @@ import java.util.Optional;
  *     <li>26.August 2021 to 27.August 2021 (sick full day)</li>
  * </ul>
  */
-public class AbsencePeriod {
+public record AbsencePeriod(
+    List<Record> absenceRecords
+) {
 
     public enum AbsenceType {
         VACATION,
@@ -43,34 +45,9 @@ public class AbsencePeriod {
         CANCELLED
     }
 
-    private final List<AbsencePeriod.Record> absenceRecords;
-
-    public AbsencePeriod(List<Record> absenceRecords) {
-        this.absenceRecords = absenceRecords;
-    }
-
-    public List<AbsencePeriod.Record> getAbsenceRecords() {
-        return Collections.unmodifiableList(absenceRecords);
-    }
-
     @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        AbsencePeriod that = (AbsencePeriod) o;
-        return Objects.equals(absenceRecords, that.absenceRecords);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(absenceRecords);
-    }
-
-    @Override
-    public String toString() {
-        return "AbsencePeriod{" +
-            "absenceRecords=" + absenceRecords +
-            '}';
+    public List<Record> absenceRecords() {
+        return Collections.unmodifiableList(absenceRecords);
     }
 
     /**
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/absence/web/AbsenceOverviewViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/absence/web/AbsenceOverviewViewController.java
index 8bbc709d9..341cc4f86 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/absence/web/AbsenceOverviewViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/absence/web/AbsenceOverviewViewController.java
@@ -203,7 +203,7 @@ public class AbsenceOverviewViewController implements HasLaunchpad {
         final HashMap<Integer, AbsenceOverviewMonthDto> monthsByNr = new HashMap<>();
 
         final Map<Person, List<AbsencePeriod.Record>> absencePeriodRecordsByPerson = openAbsences.stream()
-            .map(AbsencePeriod::getAbsenceRecords)
+            .map(AbsencePeriod::absenceRecords)
             .flatMap(List::stream)
             .collect(groupingBy(AbsencePeriod.Record::getPerson));
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveDetailVacationTypeDto.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveDetailVacationTypeDto.java
index 480e02409..3e9883626 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveDetailVacationTypeDto.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveDetailVacationTypeDto.java
@@ -3,44 +3,10 @@ package org.synyx.urlaubsverwaltung.application.application;
 import org.synyx.urlaubsverwaltung.application.vacationtype.VacationCategory;
 import org.synyx.urlaubsverwaltung.application.vacationtype.VacationTypeColor;
 
-public class ApplicationForLeaveDetailVacationTypeDto {
-
-    private final String label;
-    private final VacationCategory category;
-    private final VacationTypeColor color;
-    private final boolean requiresApprovalToCancel;
-
-    public ApplicationForLeaveDetailVacationTypeDto(String label, VacationCategory category, VacationTypeColor color,
-                                                    boolean requiresApprovalToCancel) {
-        this.label = label;
-        this.category = category;
-        this.color = color;
-        this.requiresApprovalToCancel = requiresApprovalToCancel;
-    }
-
-    public String getLabel() {
-        return label;
-    }
-
-    public VacationCategory getCategory() {
-        return category;
-    }
-
-    public VacationTypeColor getColor() {
-        return color;
-    }
-
-    public boolean isRequiresApprovalToCancel() {
-        return requiresApprovalToCancel;
-    }
-
-    @Override
-    public String toString() {
-        return "ApplicationForLeaveDetailVacationTypeDto{" +
-            "label='" + label + '\'' +
-            ", category=" + category +
-            ", color=" + color +
-            ", requiresApprovalToCancel=" + requiresApprovalToCancel +
-            '}';
-    }
+public record ApplicationForLeaveDetailVacationTypeDto(
+    String label,
+    VacationCategory category,
+    VacationTypeColor color,
+    boolean requiresApprovalToCancel
+) {
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveFormViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveFormViewController.java
index 38dbfaeeb..474e71cb9 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveFormViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveFormViewController.java
@@ -429,7 +429,7 @@ class ApplicationForLeaveFormViewController implements HasLaunchpad {
         }
 
         final List<SpecialLeaveSettingsItem> specialLeaveSettings = specialLeaveSettingsService.getSpecialLeaveSettings().stream()
-            .filter(SpecialLeaveSettingsItem::isActive)
+            .filter(SpecialLeaveSettingsItem::active)
             .toList();
         model.addAttribute("specialLeave", mapToSpecialLeaveSettingsDto(specialLeaveSettings));
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/SpecialLeaveDtoMapper.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/SpecialLeaveDtoMapper.java
index 1d80932c8..a042910c3 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/SpecialLeaveDtoMapper.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/SpecialLeaveDtoMapper.java
@@ -21,9 +21,9 @@ class SpecialLeaveDtoMapper {
 
     private static SpecialLeaveItemDto toSpecialLeaveItemDto(SpecialLeaveSettingsItem item) {
         final SpecialLeaveItemDto specialLeaveItemDto = new SpecialLeaveItemDto();
-        specialLeaveItemDto.setActive(item.isActive());
-        specialLeaveItemDto.setMessageKey(item.getMessageKey());
-        specialLeaveItemDto.setDays(item.getDays());
+        specialLeaveItemDto.setActive(item.active());
+        specialLeaveItemDto.setMessageKey(item.messageKey());
+        specialLeaveItemDto.setDays(item.days());
         return specialLeaveItemDto;
     }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveCsvExportService.java b/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveCsvExportService.java
index 904c822ba..475d55d2a 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveCsvExportService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveCsvExportService.java
@@ -32,8 +32,8 @@ class ApplicationForLeaveCsvExportService implements CsvExportService<Applicatio
         final DateTimeFormatter dateTimeFormatter = ofLocalizedDate(SHORT).withLocale(locale);
         return format("%s_%s_%s_%s.csv",
             getTranslation(locale, "applications.export.filename").replace(" ", "-"),
-            period.getStartDate().format(dateTimeFormatter).replace("/", "-"),
-            period.getEndDate().format(dateTimeFormatter).replace("/", "-"),
+            period.startDate().format(dateTimeFormatter).replace("/", "-"),
+            period.endDate().format(dateTimeFormatter).replace("/", "-"),
             locale.getLanguage());
     }
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveExportService.java b/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveExportService.java
index e6c851278..31396ab39 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveExportService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveExportService.java
@@ -114,7 +114,7 @@ class ApplicationForLeaveExportService {
         {
             final Person person = personListEntry.getKey();
             final PersonId personId = new PersonId(person.getId());
-            final String personnelNumber = basedataForPersons.getOrDefault(personId, new PersonBasedata(personId, "", "")).getPersonnelNumber();
+            final String personnelNumber = basedataForPersons.getOrDefault(personId, new PersonBasedata(personId, "", "")).personnelNumber();
             final List<String> departments = departmentsForPersons.getOrDefault(personId, List.of());
             final List<ApplicationForLeave> applicationForLeaves = personListEntry.getValue().stream().map(app -> new ApplicationForLeave(app, workDaysCountService)).toList();
             return new ApplicationForLeaveExport(personnelNumber, person.getFirstName(), person.getLastName(), applicationForLeaves, departments);
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveExportViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveExportViewController.java
index 7e5872f71..99cc8d638 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveExportViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveExportViewController.java
@@ -72,7 +72,7 @@ class ApplicationForLeaveExportViewController implements HasLaunchpad {
         final FilterPeriod period = toFilterPeriod(from, to, locale);
 
         // NOTE: Not supported at the moment
-        if (period.getStartDate().getYear() != period.getEndDate().getYear()) {
+        if (period.startDate().getYear() != period.endDate().getYear()) {
             return ResponseEntity.badRequest().build();
         }
 
@@ -82,7 +82,7 @@ class ApplicationForLeaveExportViewController implements HasLaunchpad {
         final String adaptedQuery = allElements ? "" : query;
         final PageableSearchQuery pageableSearchQuery = new PageableSearchQuery(adaptedPageable, adaptedQuery);
 
-        final Page<ApplicationForLeaveExport> exportPage = applicationForLeaveExportService.getAll(signedInUser, period.getStartDate(), period.getEndDate(), pageableSearchQuery);
+        final Page<ApplicationForLeaveExport> exportPage = applicationForLeaveExportService.getAll(signedInUser, period.startDate(), period.endDate(), pageableSearchQuery);
         final List<ApplicationForLeaveExport> export = exportPage.getContent();
         final CSVFile csvFile = applicationForLeaveCsvExportService.generateCSV(period, locale, export);
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/specialleave/SpecialLeaveSettingsItem.java b/src/main/java/org/synyx/urlaubsverwaltung/application/specialleave/SpecialLeaveSettingsItem.java
index bfa75964a..5109c969b 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/specialleave/SpecialLeaveSettingsItem.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/specialleave/SpecialLeaveSettingsItem.java
@@ -1,60 +1,9 @@
 package org.synyx.urlaubsverwaltung.application.specialleave;
 
-import java.util.Objects;
-
-public class SpecialLeaveSettingsItem {
-
-    private final Long id;
-    private final Boolean active;
-    private final String messageKey;
-    private final Integer days;
-
-    public SpecialLeaveSettingsItem(Long id, Boolean active, String messageKey, Integer days) {
-        this.id = id;
-        this.active = active;
-        this.messageKey = messageKey;
-        this.days = days;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public Boolean isActive() {
-        return active;
-    }
-
-    public String getMessageKey() {
-        return messageKey;
-    }
-
-    public Integer getDays() {
-        return days;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        SpecialLeaveSettingsItem that = (SpecialLeaveSettingsItem) o;
-        return Objects.equals(id, that.id)
-            && Objects.equals(active, that.active)
-            && Objects.equals(messageKey, that.messageKey)
-            && Objects.equals(days, that.days);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(id, active, messageKey, days);
-    }
-
-    @Override
-    public String toString() {
-        return "SpecialLeaveSettingsItem{" +
-            "id=" + id +
-            ", active=" + active +
-            ", messageKey='" + messageKey + '\'' +
-            ", days=" + days +
-            '}';
-    }
+public record SpecialLeaveSettingsItem(
+    Long id,
+    Boolean active,
+    String messageKey,
+    Integer days
+) {
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/specialleave/SpecialLeaveSettingsService.java b/src/main/java/org/synyx/urlaubsverwaltung/application/specialleave/SpecialLeaveSettingsService.java
index 5f4f85b49..6314c6c80 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/specialleave/SpecialLeaveSettingsService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/specialleave/SpecialLeaveSettingsService.java
@@ -26,7 +26,7 @@ public class SpecialLeaveSettingsService {
     public void saveAll(List<SpecialLeaveSettingsItem> specialLeaveSettingsItems) {
 
         final Map<Long, SpecialLeaveSettingsItem> itemsById = specialLeaveSettingsItems.stream()
-            .collect(toMap(SpecialLeaveSettingsItem::getId, identity()));
+            .collect(toMap(SpecialLeaveSettingsItem::id, identity()));
 
         final List<SpecialLeaveSettingsEntity> entities = specialLeaveSettingsRepository.findAllById(itemsById.keySet()).stream()
             .map(entity -> mergeUpdates(itemsById, entity))
@@ -43,8 +43,8 @@ public class SpecialLeaveSettingsService {
 
     private SpecialLeaveSettingsEntity mergeUpdates(Map<Long, SpecialLeaveSettingsItem> itemsById, SpecialLeaveSettingsEntity entity) {
         final SpecialLeaveSettingsItem specialLeaveSettingsItem = itemsById.get(entity.getId());
-        entity.setActive(specialLeaveSettingsItem.isActive());
-        entity.setDays(specialLeaveSettingsItem.getDays());
+        entity.setActive(specialLeaveSettingsItem.active());
+        entity.setDays(specialLeaveSettingsItem.days());
         return entity;
     }
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsBuilder.java b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsBuilder.java
index 6282ccc7a..616f3624f 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsBuilder.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsBuilder.java
@@ -94,8 +94,8 @@ class ApplicationForLeaveStatisticsBuilder {
 
                 if (leftOvertimeForPersons.containsKey(accountPerson)) {
                     final LeftOvertime leftOvertime = leftOvertimeForPersons.get(accountPerson);
-                    statistics.setLeftOvertimeForYear(leftOvertime.getLeftOvertimeOverall());
-                    statistics.setLeftOvertimeForPeriod(leftOvertime.getLeftOvertimeDateRange());
+                    statistics.setLeftOvertimeForYear(leftOvertime.leftOvertimeOverall());
+                    statistics.setLeftOvertimeForPeriod(leftOvertime.leftOvertimeDateRange());
                 } else {
                     statistics.setLeftOvertimeForYear(ZERO);
                     statistics.setLeftOvertimeForPeriod(ZERO);
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsCsvExportService.java b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsCsvExportService.java
index 0ae582a01..599d335c9 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsCsvExportService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsCsvExportService.java
@@ -39,8 +39,8 @@ class ApplicationForLeaveStatisticsCsvExportService implements CsvExportService<
         final DateTimeFormatter dateTimeFormatter = ofLocalizedDate(SHORT).withLocale(locale);
         return format("%s_%s_%s_%s.csv",
             getTranslation(locale, "applications.statistics").replace(" ", "-"),
-            period.getStartDate().format(dateTimeFormatter).replace("/", "-"),
-            period.getEndDate().format(dateTimeFormatter).replace("/", "-"),
+            period.startDate().format(dateTimeFormatter).replace("/", "-"),
+            period.endDate().format(dateTimeFormatter).replace("/", "-"),
             locale.getLanguage());
     }
 
@@ -56,7 +56,7 @@ class ApplicationForLeaveStatisticsCsvExportService implements CsvExportService<
             getTranslation(locale, "applications.statistics.waiting"),
             getTranslation(locale, "applications.statistics.left"),
             "",
-            getTranslation(locale, "applications.statistics.left") + " (" + period.getStartDate().getYear() + ")",
+            getTranslation(locale, "applications.statistics.left") + " (" + period.startDate().getYear() + ")",
             "",
             getTranslation(locale, "person.account.basedata.additionalInformation")
         };
@@ -84,7 +84,7 @@ class ApplicationForLeaveStatisticsCsvExportService implements CsvExportService<
         for (ApplicationForLeaveStatistics applicationForLeaveStatistics : statistics) {
 
             final String[] csvRow = new String[csvHeader.length];
-            csvRow[0] = applicationForLeaveStatistics.getPersonBasedata().map(PersonBasedata::getPersonnelNumber).orElse("");
+            csvRow[0] = applicationForLeaveStatistics.getPersonBasedata().map(PersonBasedata::personnelNumber).orElse("");
             csvRow[1] = applicationForLeaveStatistics.getPerson().getFirstName();
             csvRow[2] = applicationForLeaveStatistics.getPerson().getLastName();
             csvRow[3] = translatedTextTotal;
@@ -97,7 +97,7 @@ class ApplicationForLeaveStatisticsCsvExportService implements CsvExportService<
             csvRow[8] = decimalFormat.format(applicationForLeaveStatistics.getLeftVacationDaysForYear());
             csvRow[9] = decimalFormat.format(BigDecimal.valueOf((double) applicationForLeaveStatistics.getLeftOvertimeForYear().toMinutes() / 60));
 
-            csvRow[10] = applicationForLeaveStatistics.getPersonBasedata().map(PersonBasedata::getAdditionalInformation).orElse("");
+            csvRow[10] = applicationForLeaveStatistics.getPersonBasedata().map(PersonBasedata::additionalInformation).orElse("");
             csvWriter.writeNext(csvRow);
 
             for (final VacationType<?> type : allVacationTypes) {
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsMapper.java b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsMapper.java
index b5bb1ba51..1a926e5ce 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsMapper.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsMapper.java
@@ -24,7 +24,7 @@ final class ApplicationForLeaveStatisticsMapper {
             statistics.getPerson().getLastName(),
             statistics.getPerson().getNiceName(),
             statistics.getPerson().getGravatarURL(),
-            statistics.getPersonBasedata().map(PersonBasedata::getPersonnelNumber).orElse(""),
+            statistics.getPersonBasedata().map(PersonBasedata::personnelNumber).orElse(""),
             statistics.getTotalAllowedVacationDays(),
             toVacationDaysDtoMap(statistics.getAllowedVacationDays(), locale),
             statistics.getTotalWaitingVacationDays(),
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsService.java b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsService.java
index 05466b214..7990903f4 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsService.java
@@ -63,7 +63,7 @@ class ApplicationForLeaveStatisticsService {
         final Map<PersonId, PersonBasedata> basedataByPersonId = personBasedataService.getBasedataByPersonId(personIdValues);
 
         final Collection<ApplicationForLeaveStatistics> statisticsCollection = applicationForLeaveStatisticsBuilder
-            .build(relevantPersonsPage.getContent(), period.getStartDate(), period.getEndDate(), activeVacationTypes).values();
+            .build(relevantPersonsPage.getContent(), period.startDate(), period.endDate(), activeVacationTypes).values();
 
         statisticsCollection.forEach(statistics -> {
             final PersonId personId = new PersonId(statistics.getPerson().getId());
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsViewController.java
index fc4765d0f..a3369d9c9 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsViewController.java
@@ -101,7 +101,7 @@ class ApplicationForLeaveStatisticsViewController implements HasLaunchpad {
         model.addAttribute("sortSelect", sortSelectDto);
         model.addAttribute("query", query);
 
-        if (period.getStartDate().getYear() != period.getEndDate().getYear()) {
+        if (period.startDate().getYear() != period.endDate().getYear()) {
             model.addAttribute("period", period);
             model.addAttribute("errors", "INVALID_PERIOD");
             model.addAttribute("statisticsPagination", new PaginationDto<>(new PageImpl<>(List.of(), pageable, 0), pageLinkPrefix));
@@ -126,8 +126,8 @@ class ApplicationForLeaveStatisticsViewController implements HasLaunchpad {
         model.addAttribute("paginationPageNumbers", IntStream.rangeClosed(1, personsPage.getTotalPages()).boxed().toList());
         model.addAttribute("sortQuery", pageable.getSort().stream().map(order -> order.getProperty() + "," + order.getDirection()).collect(joining("&")));
         model.addAttribute("period", period);
-        model.addAttribute("from", period.getStartDate());
-        model.addAttribute("to", period.getEndDate());
+        model.addAttribute("from", period.startDate());
+        model.addAttribute("to", period.endDate());
         model.addAttribute("statistics", statisticsDtos);
         model.addAttribute("showPersonnelNumberColumn", showPersonnelNumberColumn);
         model.addAttribute("vacationTypes", vacationTypeDtos(locale));
@@ -161,7 +161,7 @@ class ApplicationForLeaveStatisticsViewController implements HasLaunchpad {
         final FilterPeriod period = toFilterPeriod(from, to, locale);
 
         // NOTE: Not supported at the moment
-        if (period.getStartDate().getYear() != period.getEndDate().getYear()) {
+        if (period.startDate().getYear() != period.endDate().getYear()) {
             return ResponseEntity.badRequest().build();
         }
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/vacationtype/VacationTypeDto.java b/src/main/java/org/synyx/urlaubsverwaltung/application/vacationtype/VacationTypeDto.java
index 6336eb15b..00b9b96b9 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/vacationtype/VacationTypeDto.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/vacationtype/VacationTypeDto.java
@@ -1,34 +1,7 @@
 package org.synyx.urlaubsverwaltung.application.vacationtype;
 
-import java.util.Objects;
-
-public class VacationTypeDto {
-    private final Long id;
-    private final VacationTypeColor color;
-
-    public VacationTypeDto(Long id, VacationTypeColor color) {
-        this.id = id;
-        this.color = color;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public VacationTypeColor getColor() {
-        return color;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        VacationTypeDto that = (VacationTypeDto) o;
-        return Objects.equals(id, that.id) && Objects.equals(color, that.color);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(id, color);
-    }
+public record VacationTypeDto(
+    Long id,
+    VacationTypeColor color
+) {
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarAbsence.java b/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarAbsence.java
index 25e5aed6f..c5d02a517 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarAbsence.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarAbsence.java
@@ -29,10 +29,10 @@ public class CalendarAbsence {
         this.person = person;
         this.absenceType = absenceType;
 
-        final ZonedDateTime periodStartDate = period.getStartDate().atStartOfDay(ZoneId.of(absenceTimeConfiguration.getTimeZoneId()));
-        final ZonedDateTime periodEndDate = period.getEndDate().atStartOfDay(ZoneId.of(absenceTimeConfiguration.getTimeZoneId()));
+        final ZonedDateTime periodStartDate = period.startDate().atStartOfDay(ZoneId.of(absenceTimeConfiguration.getTimeZoneId()));
+        final ZonedDateTime periodEndDate = period.endDate().atStartOfDay(ZoneId.of(absenceTimeConfiguration.getTimeZoneId()));
 
-        switch (period.getDayLength()) {
+        switch (period.dayLength()) {
             case FULL -> {
                 this.startDate = periodStartDate;
                 this.endDate = periodEndDate.plusDays(1);
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/extension/application/ApplicationEventHandlerExtension.java b/src/main/java/org/synyx/urlaubsverwaltung/extension/application/ApplicationEventHandlerExtension.java
index 32499f8e2..fde158508 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/extension/application/ApplicationEventHandlerExtension.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/extension/application/ApplicationEventHandlerExtension.java
@@ -51,7 +51,7 @@ public class ApplicationEventHandlerExtension {
     }
 
     private static Set<LocalDate> toAbsentWorkingDays(AbsencePeriod absencePeriod) {
-        return absencePeriod.getAbsenceRecords()
+        return absencePeriod.absenceRecords()
             .stream()
             .map(AbsencePeriod.Record::getDate)
             .collect(Collectors.toSet());
@@ -227,11 +227,11 @@ public class ApplicationEventHandlerExtension {
     }
 
     private static Predicate<AbsencePeriod> isMorning(org.synyx.urlaubsverwaltung.period.DayLength dayLength) {
-        return absencePeriod -> dayLength.isMorning() && absencePeriod.getAbsenceRecords().stream().allMatch(absenceRecord -> absenceRecord.getMorning().isPresent());
+        return absencePeriod -> dayLength.isMorning() && absencePeriod.absenceRecords().stream().allMatch(absenceRecord -> absenceRecord.getMorning().isPresent());
     }
 
     private static Predicate<AbsencePeriod> isNoon(org.synyx.urlaubsverwaltung.period.DayLength dayLength) {
-        return absencePeriod -> dayLength.isNoon() && absencePeriod.getAbsenceRecords().stream().allMatch(absenceRecord -> absenceRecord.getNoon().isPresent());
+        return absencePeriod -> dayLength.isNoon() && absencePeriod.absenceRecords().stream().allMatch(absenceRecord -> absenceRecord.getNoon().isPresent());
     }
 
     private static String getTranslationKey(VacationType<?> vacationType) {
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/extension/backup/backup/PersonDataCollectionService.java b/src/main/java/org/synyx/urlaubsverwaltung/extension/backup/backup/PersonDataCollectionService.java
index ec8c59c09..0562ddc6f 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/extension/backup/backup/PersonDataCollectionService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/extension/backup/backup/PersonDataCollectionService.java
@@ -50,7 +50,7 @@ class PersonDataCollectionService {
 
             final List<RoleDTO> permissions = person.getPermissions().stream().map(role -> RoleDTO.valueOf(role.name())).toList();
             final List<MailNotificationDTO> mailNotificationDTOS = person.getNotifications().stream().map(notification -> MailNotificationDTO.valueOf(notification.name())).toList();
-            final PersonBaseDataDTO personBaseDataDTO = personBasedataService.getBasedataByPersonId(person.getId()).map(personBasedata -> new PersonBaseDataDTO(personBasedata.getPersonnelNumber(), personBasedata.getAdditionalInformation())).orElse(null);
+            final PersonBaseDataDTO personBaseDataDTO = personBasedataService.getBasedataByPersonId(person.getId()).map(personBasedata -> new PersonBaseDataDTO(personBasedata.personnelNumber(), personBasedata.additionalInformation())).orElse(null);
 
             final List<AccountDTO> accountDTOS = accountService.getHolidaysAccountsByPerson(person).stream().map(account -> new AccountDTO(account.getValidFrom(), account.getValidTo(), account.isDoRemainingVacationDaysExpireLocally(), account.isDoRemainingVacationDaysExpireGlobally(), account.getExpiryDateLocally(), account.getExpiryDateGlobally(), account.getExpiryNotificationSentDate(), account.getAnnualVacationDays(), account.getActualVacationDays(), account.getRemainingVacationDays(), account.getRemainingVacationDaysNotExpiring(), account.getComment())).toList();
             final List<WorkingTimeDTO> workingTimeDTOS = workingTimeService.getByPerson(person).stream().map(workingTime -> new WorkingTimeDTO(DayLengthDTO.valueOf(workingTime.getMonday().name()), DayLengthDTO.valueOf(workingTime.getTuesday().name()), DayLengthDTO.valueOf(workingTime.getWednesday().name()), DayLengthDTO.valueOf(workingTime.getThursday().name()), DayLengthDTO.valueOf(workingTime.getFriday().name()), DayLengthDTO.valueOf(workingTime.getSaturday().name()), DayLengthDTO.valueOf(workingTime.getSunday().name()), workingTime.getValidFrom(), FederalStateDTO.valueOf(workingTime.getFederalState().name()), workingTime.isDefaultFederalState())).toList();
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/extension/backup/model/SickNoteCommentDTO.java b/src/main/java/org/synyx/urlaubsverwaltung/extension/backup/model/SickNoteCommentDTO.java
index 777ed90fe..8b4623718 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/extension/backup/model/SickNoteCommentDTO.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/extension/backup/model/SickNoteCommentDTO.java
@@ -9,9 +9,12 @@ import java.time.ZoneId;
 
 import static java.util.Objects.requireNonNullElse;
 
-public record SickNoteCommentDTO(Instant date, String text, SickNoteCommentActionDTO sickNoteCommentAction,
-                                 String externalIdOfSickNoteCommentAuthor) {
-
+public record SickNoteCommentDTO(
+    Instant date,
+    String text,
+    SickNoteCommentActionDTO sickNoteCommentAction,
+    String externalIdOfSickNoteCommentAuthor
+) {
     public SickNoteCommentEntity toSickNoteCommentEntity(Person commentator, Long sickNoteId) {
         final SickNoteCommentEntity entity = new SickNoteCommentEntity(Clock.fixed(this.date, ZoneId.systemDefault()));
         entity.setSickNoteId(sickNoteId);
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/extension/sicknote/SickNoteEventHandlerExtension.java b/src/main/java/org/synyx/urlaubsverwaltung/extension/sicknote/SickNoteEventHandlerExtension.java
index 82ed8fe53..d551ec87e 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/extension/sicknote/SickNoteEventHandlerExtension.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/extension/sicknote/SickNoteEventHandlerExtension.java
@@ -53,7 +53,7 @@ public class SickNoteEventHandlerExtension {
     }
 
     private static Set<LocalDate> toAbsentWorkingDays(AbsencePeriod absencePeriod) {
-        return absencePeriod.getAbsenceRecords()
+        return absencePeriod.absenceRecords()
             .stream()
             .map(AbsencePeriod.Record::getDate)
             .collect(Collectors.toSet());
@@ -281,10 +281,10 @@ public class SickNoteEventHandlerExtension {
     }
 
     private static Predicate<AbsencePeriod> isMorning(org.synyx.urlaubsverwaltung.period.DayLength dayLength) {
-        return absencePeriod -> dayLength.isMorning() && absencePeriod.getAbsenceRecords().stream().allMatch(absenceRecord -> absenceRecord.getMorning().isPresent());
+        return absencePeriod -> dayLength.isMorning() && absencePeriod.absenceRecords().stream().allMatch(absenceRecord -> absenceRecord.getMorning().isPresent());
     }
 
     private static Predicate<AbsencePeriod> isNoon(org.synyx.urlaubsverwaltung.period.DayLength dayLength) {
-        return absencePeriod -> dayLength.isNoon() && absencePeriod.getAbsenceRecords().stream().allMatch(absenceRecord -> absenceRecord.getNoon().isPresent());
+        return absencePeriod -> dayLength.isNoon() && absencePeriod.absenceRecords().stream().allMatch(absenceRecord -> absenceRecord.getNoon().isPresent());
     }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/overtime/LeftOvertime.java b/src/main/java/org/synyx/urlaubsverwaltung/overtime/LeftOvertime.java
index d7bc43cbf..e6488cecc 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/overtime/LeftOvertime.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/overtime/LeftOvertime.java
@@ -7,24 +7,10 @@ import java.util.Map;
  * Provides information about the left overtime for a year and a given date range.
  * Should be used in combination with a {@link Map} to keep relation to a {@link org.synyx.urlaubsverwaltung.person.Person} for example.
  */
-public class LeftOvertime {
-
-    private final Duration leftOvertimeOverall;
-    private final Duration leftOvertimeDateRange;
-
-    public LeftOvertime(Duration leftOvertimeOverall, Duration leftOvertimeDateRange) {
-        this.leftOvertimeOverall = leftOvertimeOverall;
-        this.leftOvertimeDateRange = leftOvertimeDateRange;
-    }
-
-    public Duration getLeftOvertimeOverall() {
-        return leftOvertimeOverall;
-    }
-
-    public Duration getLeftOvertimeDateRange() {
-        return leftOvertimeDateRange;
-    }
-
+public record LeftOvertime(
+    Duration leftOvertimeOverall,
+    Duration leftOvertimeDateRange
+) {
     /**
      * @return an empty {@link LeftOvertime} to describe "no overtime information"
      */
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/period/Period.java b/src/main/java/org/synyx/urlaubsverwaltung/period/Period.java
index 08cc7cb5a..d84700961 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/period/Period.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/period/Period.java
@@ -7,13 +7,12 @@ import java.time.LocalDate;
 /**
  * Represents a period of time.
  */
-public class Period {
-
-    private final LocalDate startDate;
-    private final LocalDate endDate;
-    private final DayLength dayLength;
-
-    public Period(LocalDate startDate, LocalDate endDate, DayLength dayLength) {
+public record Period(
+    LocalDate startDate,
+    LocalDate endDate,
+    DayLength dayLength
+) {
+    public Period {
         Assert.isTrue(!dayLength.equals(DayLength.ZERO), "Day length may not be zero");
 
         if (dayLength.isFull() && startDate.isAfter(endDate)) {
@@ -23,21 +22,5 @@ public class Period {
         if (dayLength.isHalfDay() && !startDate.isEqual(endDate)) {
             throw new IllegalArgumentException("Start and end date must be same for half day length");
         }
-
-        this.startDate = startDate;
-        this.endDate = endDate;
-        this.dayLength = dayLength;
-    }
-
-    public LocalDate getStartDate() {
-        return startDate;
-    }
-
-    public LocalDate getEndDate() {
-        return endDate;
-    }
-
-    public DayLength getDayLength() {
-        return dayLength;
     }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedata.java b/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedata.java
index 2470cbea9..7f3bbab98 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedata.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedata.java
@@ -2,27 +2,9 @@ package org.synyx.urlaubsverwaltung.person.basedata;
 
 import org.synyx.urlaubsverwaltung.person.PersonId;
 
-public class PersonBasedata {
-
-    private final PersonId personId;
-    private final String personnelNumber;
-    private final String additionalInformation;
-
-    public PersonBasedata(PersonId personId, String personnelNumber, String additionalInformation) {
-        this.personId = personId;
-        this.personnelNumber = personnelNumber;
-        this.additionalInformation = additionalInformation;
-    }
-
-    public PersonId getPersonId() {
-        return personId;
-    }
-
-    public String getPersonnelNumber() {
-        return personnelNumber;
-    }
-
-    public String getAdditionalInformation() {
-        return additionalInformation;
-    }
+public record PersonBasedata(
+    PersonId personId,
+    String personnelNumber,
+    String additionalInformation
+) {
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataDtoMapper.java b/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataDtoMapper.java
index e80e97936..6fb440a59 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataDtoMapper.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataDtoMapper.java
@@ -10,9 +10,9 @@ final class PersonBasedataDtoMapper {
 
     static PersonBasedataDto mapToPersonBasedataDto(PersonBasedata personBasedata, Person person) {
         final PersonBasedataDto personBasedataDto = new PersonBasedataDto();
-        personBasedataDto.setPersonId(personBasedata.getPersonId().value());
-        personBasedataDto.setPersonnelNumber(personBasedata.getPersonnelNumber());
-        personBasedataDto.setAdditionalInfo(personBasedata.getAdditionalInformation());
+        personBasedataDto.setPersonId(personBasedata.personId().value());
+        personBasedataDto.setPersonnelNumber(personBasedata.personnelNumber());
+        personBasedataDto.setAdditionalInfo(personBasedata.additionalInformation());
         personBasedataDto.setNiceName(person.getNiceName());
         personBasedataDto.setGravatarURL(person.getGravatarURL());
         personBasedataDto.setEmail(person.getEmail());
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataMapper.java b/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataMapper.java
index 384f91905..22a573fe2 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataMapper.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataMapper.java
@@ -18,9 +18,9 @@ class PersonBasedataMapper {
 
     public static PersonBasedataEntity mapToEntity(PersonBasedata personBasedata) {
         final PersonBasedataEntity personBasedataEntity = new PersonBasedataEntity();
-        personBasedataEntity.setPersonId(personBasedata.getPersonId().value());
-        personBasedataEntity.setPersonnelNumber(personBasedata.getPersonnelNumber());
-        personBasedataEntity.setAdditionalInformation(personBasedata.getAdditionalInformation());
+        personBasedataEntity.setPersonId(personBasedata.personId().value());
+        personBasedataEntity.setPersonnelNumber(personBasedata.personnelNumber());
+        personBasedataEntity.setAdditionalInformation(personBasedata.additionalInformation());
         return personBasedataEntity;
     }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataServiceImpl.java
index 376c846e8..4268fad8f 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataServiceImpl.java
@@ -32,7 +32,7 @@ class PersonBasedataServiceImpl implements PersonBasedataService {
     public Map<PersonId, PersonBasedata> getBasedataByPersonId(List<Long> personIds) {
         return personBasedataRepository.findAllByPersonIdIsIn(personIds).stream()
             .map(PersonBasedataMapper::mapFromEntity)
-            .collect(toMap(PersonBasedata::getPersonId, identity()));
+            .collect(toMap(PersonBasedata::personId, identity()));
     }
 
     @Override
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonDetailsBasedataDtoMapper.java b/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonDetailsBasedataDtoMapper.java
index 1adf129bd..c6f6a6755 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonDetailsBasedataDtoMapper.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonDetailsBasedataDtoMapper.java
@@ -8,6 +8,6 @@ final class PersonDetailsBasedataDtoMapper {
     }
 
     static PersonDetailsBasedataDto mapToPersonDetailsBasedataDto(PersonBasedata basedata) {
-        return new PersonDetailsBasedataDto(basedata.getPersonnelNumber(), basedata.getAdditionalInformation());
+        return new PersonDetailsBasedataDto(basedata.personnelNumber(), basedata.additionalInformation());
     }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonsViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonsViewController.java
index a36a84780..09c1d6380 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonsViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonsViewController.java
@@ -257,7 +257,7 @@ public class PersonsViewController implements HasLaunchpad {
                 .lastName(lastName);
 
             personBasedataService.getBasedataByPersonId(person.getId())
-                .ifPresent(personBasedata -> personDtoBuilder.personnelNumber(personBasedata.getPersonnelNumber()));
+                .ifPresent(personBasedata -> personDtoBuilder.personnelNumber(personBasedata.personnelNumber()));
 
             final PersonDto personDto = personDtoBuilder.build();
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/settings/SpecialLeaveSettingsDtoMapper.java b/src/main/java/org/synyx/urlaubsverwaltung/settings/SpecialLeaveSettingsDtoMapper.java
index e47d7223b..293f3e20a 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/settings/SpecialLeaveSettingsDtoMapper.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/settings/SpecialLeaveSettingsDtoMapper.java
@@ -20,10 +20,10 @@ public class SpecialLeaveSettingsDtoMapper {
         final List<SpecialLeaveSettingsItemDto> specialLeaveSettingsItemDtos = specialLeaveSettingsItems.stream()
             .map(item -> {
                 final SpecialLeaveSettingsItemDto specialLeaveSettingsItemDto = new SpecialLeaveSettingsItemDto();
-                specialLeaveSettingsItemDto.setId(item.getId());
-                specialLeaveSettingsItemDto.setActive(item.isActive());
-                specialLeaveSettingsItemDto.setMessageKey(item.getMessageKey());
-                specialLeaveSettingsItemDto.setDays(item.getDays());
+                specialLeaveSettingsItemDto.setId(item.id());
+                specialLeaveSettingsItemDto.setActive(item.active());
+                specialLeaveSettingsItemDto.setMessageKey(item.messageKey());
+                specialLeaveSettingsItemDto.setDays(item.days());
                 return specialLeaveSettingsItemDto;
             })
             .toList();
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysDetailedStatisticsCsvExportService.java b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysDetailedStatisticsCsvExportService.java
index 363da2e53..e90e8ab3a 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysDetailedStatisticsCsvExportService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysDetailedStatisticsCsvExportService.java
@@ -32,8 +32,8 @@ class SickDaysDetailedStatisticsCsvExportService implements CsvExportService<Sic
         final DateTimeFormatter dateTimeFormatter = ofLocalizedDate(SHORT).withLocale(locale);
         return format("%s_%s_%s_%s.csv",
             getTranslation(locale, "action.sicknotes.download.filename").replace(" ", "-"),
-            period.getStartDate().format(dateTimeFormatter).replace("/", "-"),
-            period.getEndDate().format(dateTimeFormatter).replace("/", "-"),
+            period.startDate().format(dateTimeFormatter).replace("/", "-"),
+            period.endDate().format(dateTimeFormatter).replace("/", "-"),
             locale.getLanguage());
     }
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewDto.java b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewDto.java
index f880d83d0..7efa1726f 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewDto.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewDto.java
@@ -2,95 +2,23 @@ package org.synyx.urlaubsverwaltung.sicknote.sickdays;
 
 import java.math.BigDecimal;
 
-public class SickDaysOverviewDto {
-
-    private final long personId;
-    private final String personAvatarUrl;
-    private final String personnelNumber;
-    private final String personFirstName;
-    private final String personLastName;
-    private final String personNiceName;
-    private final BigDecimal amountSickDays;
-    private final BigDecimal amountSickDaysWithAUB;
-    private final BigDecimal amountChildSickDays;
-    private final BigDecimal amountChildSickDaysWithAUB;
-
-    private SickDaysOverviewDto(long personId, String personAvatarUrl, String personnelNumber, String personFirstName,
-                                String personLastName, String personNiceName, BigDecimal amountSickDays,
-                                BigDecimal amountSickDaysWithAUB, BigDecimal amountChildSickDays, BigDecimal amountChildSickDaysWithAUB) {
-
-        this.personId = personId;
-        this.personAvatarUrl = personAvatarUrl;
-        this.personnelNumber = personnelNumber;
-        this.personFirstName = personFirstName;
-        this.personLastName = personLastName;
-        this.personNiceName = personNiceName;
-        this.amountSickDays = amountSickDays;
-        this.amountSickDaysWithAUB = amountSickDaysWithAUB;
-        this.amountChildSickDays = amountChildSickDays;
-        this.amountChildSickDaysWithAUB = amountChildSickDaysWithAUB;
-    }
-
-    public long getPersonId() {
-        return personId;
-    }
-
-    public String getPersonAvatarUrl() {
-        return personAvatarUrl;
-    }
-
-    public String getPersonnelNumber() {
-        return personnelNumber;
-    }
-
-    public String getPersonFirstName() {
-        return personFirstName;
-    }
-
-    public String getPersonLastName() {
-        return personLastName;
-    }
-
-    public String getPersonNiceName() {
-        return personNiceName;
-    }
-
-    public BigDecimal getAmountSickDays() {
-        return amountSickDays;
-    }
-
-    public BigDecimal getAmountSickDaysWithAUB() {
-        return amountSickDaysWithAUB;
-    }
-
-    public BigDecimal getAmountChildSickDays() {
-        return amountChildSickDays;
-    }
-
-    public BigDecimal getAmountChildSickDaysWithAUB() {
-        return amountChildSickDaysWithAUB;
-    }
+public record SickDaysOverviewDto(
+    long personId,
+    String personAvatarUrl,
+    String personnelNumber,
+    String personFirstName,
+    String personLastName,
+    String personNiceName,
+    BigDecimal amountSickDays,
+    BigDecimal amountSickDaysWithAUB,
+    BigDecimal amountChildSickDays,
+    BigDecimal amountChildSickDaysWithAUB
+) {
 
     public static SickDaysOverviewDto.Builder builder() {
         return new Builder();
     }
 
-    @Override
-    public String toString() {
-        return "SickDaysOverviewDto{" +
-            "personId=" + personId +
-            ", personAvatarUrl='" + personAvatarUrl + '\'' +
-            ", personnelNumber='" + personnelNumber + '\'' +
-            ", personFirstName='" + personFirstName + '\'' +
-            ", personLastName='" + personLastName + '\'' +
-            ", personNiceName='" + personNiceName + '\'' +
-            ", amountSickDays=" + amountSickDays +
-            ", amountSickDaysWithAUB=" + amountSickDaysWithAUB +
-            ", amountChildSickDays=" + amountChildSickDays +
-            ", amountChildSickDaysWithAUB=" + amountChildSickDaysWithAUB +
-            '}';
-    }
-
     static class Builder {
         private long personId;
         private String personAvatarUrl;
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewViewController.java
index cfa59282b..0ca76001c 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewViewController.java
@@ -53,9 +53,12 @@ public class SickDaysOverviewViewController implements HasLaunchpad {
     private final Clock clock;
 
     @Autowired
-    public SickDaysOverviewViewController(SickDaysStatisticsService sickDaysStatisticsService,
-                                          PersonService personService, DateFormatAware dateFormatAware, Clock clock) {
-
+    public SickDaysOverviewViewController(
+        SickDaysStatisticsService sickDaysStatisticsService,
+        PersonService personService,
+        DateFormatAware dateFormatAware,
+        Clock clock
+    ) {
         this.sickDaysStatisticsService = sickDaysStatisticsService;
         this.personService = personService;
         this.dateFormatAware = dateFormatAware;
@@ -64,13 +67,14 @@ public class SickDaysOverviewViewController implements HasLaunchpad {
 
     @PreAuthorize("hasAnyAuthority('OFFICE', 'SICK_NOTE_VIEW')")
     @GetMapping("/sickdays")
-    public String periodsSickNotes(@RequestParam(value = "from", defaultValue = "") String from,
-                                   @RequestParam(value = "to", defaultValue = "") String to,
-                                   @RequestParam(value = "query", required = false, defaultValue = "") String query,
-                                   @SortDefault(sort = "person.firstName", direction = Sort.Direction.ASC) Pageable pageable,
-                                   @RequestHeader(name = "Turbo-Frame", required = false) String turboFrame,
-                                   Model model, Locale locale) {
-
+    public String periodsSickNotes(
+        @RequestParam(value = "from", defaultValue = "") String from,
+        @RequestParam(value = "to", defaultValue = "") String to,
+        @RequestParam(value = "query", required = false, defaultValue = "") String query,
+        @SortDefault(sort = "person.firstName", direction = Sort.Direction.ASC) Pageable pageable,
+        @RequestHeader(name = "Turbo-Frame", required = false) String turboFrame,
+        Model model, Locale locale
+    ) {
         final LocalDate firstDayOfYear = Year.now(clock).atDay(1);
         final LocalDate startDate = dateFormatAware.parse(from, locale).orElse(firstDayOfYear);
         final LocalDate endDate = dateFormatAware.parse(to, locale).orElseGet(() -> firstDayOfYear.with(lastDayOfYear()));
@@ -79,17 +83,15 @@ public class SickDaysOverviewViewController implements HasLaunchpad {
         final Person signedInUser = personService.getSignedInUser();
 
         final Page<SickDaysDetailedStatistics> sickDaysStatisticsPage =
-            sickDaysStatisticsService.getAll(signedInUser, period.getStartDate(), period.getEndDate(), new PageableSearchQuery(pageable, query));
-
-        final List<SickDaysOverviewDto> sickDaysOverviewDtos = sickDaysStatisticsPage.stream()
-            .map(statistic -> toSickDaysOverviewDto(statistic, period.getStartDate(), period.getEndDate()))
-            .toList();
+            sickDaysStatisticsService.getAll(signedInUser, period.startDate(), period.endDate(), new PageableSearchQuery(pageable, query));
 
-        model.addAttribute("sickDaysStatistics", sickDaysOverviewDtos);
         model.addAttribute("showPersonnelNumberColumn", personnelNumberAvailable(sickDaysStatisticsPage.getContent()));
 
-        final String pageLinkPrefix = buildPageLinkPrefix(sickDaysStatisticsPage.getPageable(), Map.of("from", from, "to", to, "query", query));
+        final List<SickDaysOverviewDto> sickDaysOverviewDtos = sickDaysStatisticsPage.stream()
+            .map(statistic -> toSickDaysOverviewDto(statistic, period.startDate(), period.endDate()))
+            .toList();
         final PageImpl<SickDaysOverviewDto> statisticsPage = new PageImpl<>(sickDaysOverviewDtos, pageable, sickDaysStatisticsPage.getTotalElements());
+        final String pageLinkPrefix = buildPageLinkPrefix(sickDaysStatisticsPage.getPageable(), Map.of("from", from, "to", to, "query", query));
 
         model.addAttribute("statisticsPagination", new PaginationDto<>(statisticsPage, pageLinkPrefix));
         model.addAttribute("paginationPageNumbers", IntStream.rangeClosed(1, sickDaysStatisticsPage.getTotalPages()).boxed().toList());
@@ -100,8 +102,8 @@ public class SickDaysOverviewViewController implements HasLaunchpad {
         model.addAttribute("query", query);
 
         model.addAttribute("today", LocalDate.now(clock));
-        model.addAttribute("from", period.getStartDate());
-        model.addAttribute("to", period.getEndDate());
+        model.addAttribute("from", period.startDate());
+        model.addAttribute("to", period.endDate());
         model.addAttribute("period", period);
 
         final boolean turboFrameRequested = hasText(turboFrame);
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysStatisticsService.java b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysStatisticsService.java
index b3f842f10..fd8fd998b 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysStatisticsService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysStatisticsService.java
@@ -99,7 +99,7 @@ public class SickDaysStatisticsService {
         {
             final Person person = personListEntry.getKey();
             final PersonId personId = new PersonId(person.getId());
-            final String personnelNumber = basedataForPersons.getOrDefault(personId, new PersonBasedata(personId, "", "")).getPersonnelNumber();
+            final String personnelNumber = basedataForPersons.getOrDefault(personId, new PersonBasedata(personId, "", "")).personnelNumber();
             final List<String> departments = departmentsForPersons.getOrDefault(personId, List.of());
             return new SickDaysDetailedStatistics(personnelNumber, person, personListEntry.getValue(), departments);
         };
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysStatisticsViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysStatisticsViewController.java
index 3c6d357a0..e0df6e999 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysStatisticsViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysStatisticsViewController.java
@@ -80,7 +80,7 @@ class SickDaysStatisticsViewController {
         final PageableSearchQuery pageableSearchQuery = new PageableSearchQuery(adaptedPageable, adaptedQuery);
 
         final Page<SickDaysDetailedStatistics> sickDaysStatisticsPage =
-            sickDaysStatisticsService.getAll(signedInUser, period.getStartDate(), period.getEndDate(), pageableSearchQuery);
+            sickDaysStatisticsService.getAll(signedInUser, period.startDate(), period.endDate(), pageableSearchQuery);
 
         final CSVFile csvFile = sickDaysDetailedStatisticsCsvExportService.generateCSV(period, locale, sickDaysStatisticsPage.getContent());
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/user/pagination/PageableDefaultSizeChangedEventConsumer.java b/src/main/java/org/synyx/urlaubsverwaltung/user/pagination/PageableDefaultSizeChangedEventConsumer.java
index 28b4e5bf1..2036804cb 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/user/pagination/PageableDefaultSizeChangedEventConsumer.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/user/pagination/PageableDefaultSizeChangedEventConsumer.java
@@ -17,6 +17,6 @@ class PageableDefaultSizeChangedEventConsumer {
     @Async
     @EventListener
     public void onPageableDefaultSizeChanged(PageableDefaultSizeChangedEvent event) {
-        userPaginationSettingsService.updatePageableDefaultSize(event.getPersonId(), event.getNewPageableDefaultSize());
+        userPaginationSettingsService.updatePageableDefaultSize(event.personId(), event.newPageableDefaultSize());
     }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/web/FilterPeriod.java b/src/main/java/org/synyx/urlaubsverwaltung/web/FilterPeriod.java
index ddc436bd0..68dc3bab0 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/web/FilterPeriod.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/web/FilterPeriod.java
@@ -2,68 +2,24 @@ package org.synyx.urlaubsverwaltung.web;
 
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
-import java.util.Objects;
 import java.util.Optional;
 
 /**
  * Represents a period of time to filter requests by.
  */
-public final class FilterPeriod {
-
-    private final LocalDate startDate;
-    private final LocalDate endDate;
-
-    public FilterPeriod(LocalDate startDate, LocalDate endDate) {
-        this.startDate = startDate;
-        this.endDate = endDate;
-    }
-
-    public LocalDate getStartDate() {
-        return startDate;
-    }
-
+public record FilterPeriod(
+    LocalDate startDate,
+    LocalDate endDate
+) {
     public String getStartDateIsoValue() {
         return Optional.ofNullable(startDate)
             .map(date -> date.format(DateTimeFormatter.ISO_DATE))
             .orElse("");
     }
 
-    public LocalDate getEndDate() {
-        return endDate;
-    }
-
     public String getEndDateIsoValue() {
         return Optional.ofNullable(endDate)
             .map(date -> date.format(DateTimeFormatter.ISO_DATE))
             .orElse("");
     }
-
-    @Override
-    public String toString() {
-        return "FilterPeriod{" +
-            "startDate=" + startDate +
-            ", endDate=" + endDate +
-            '}';
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-
-        final FilterPeriod period = (FilterPeriod) o;
-
-        return Objects.equals(getStartDate(), period.getStartDate()) &&
-            Objects.equals(getEndDate(), period.getEndDate());
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(getStartDate(), getEndDate());
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/web/NavigationDto.java b/src/main/java/org/synyx/urlaubsverwaltung/web/NavigationDto.java
index 6e71166ac..2d126c1ce 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/web/NavigationDto.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/web/NavigationDto.java
@@ -2,15 +2,7 @@ package org.synyx.urlaubsverwaltung.web;
 
 import java.util.List;
 
-class NavigationDto {
-
-    private final List<NavigationItemDto> elements;
-
-    NavigationDto(List<NavigationItemDto> elements) {
-        this.elements = elements;
-    }
-
-    public List<NavigationItemDto> getElements() {
-        return elements;
-    }
+record NavigationDto(
+    List<NavigationItemDto> elements
+) {
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlOptgroupDto.java b/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlOptgroupDto.java
index a81edb95c..b085737b7 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlOptgroupDto.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlOptgroupDto.java
@@ -2,21 +2,8 @@ package org.synyx.urlaubsverwaltung.web.html;
 
 import java.util.List;
 
-public class HtmlOptgroupDto {
-
-    private final String labelMessageKey;
-    private final List<HtmlOptionDto> options;
-
-    public HtmlOptgroupDto(String labelMessageKey, List<HtmlOptionDto> options) {
-        this.labelMessageKey = labelMessageKey;
-        this.options = options;
-    }
-
-    public String getLabelMessageKey() {
-        return labelMessageKey;
-    }
-
-    public List<HtmlOptionDto> getOptions() {
-        return options;
-    }
+public record HtmlOptgroupDto(
+    String labelMessageKey,
+    List<HtmlOptionDto> options
+) {
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlOptionDto.java b/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlOptionDto.java
index e22b8ae03..77611d036 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlOptionDto.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlOptionDto.java
@@ -1,26 +1,8 @@
 package org.synyx.urlaubsverwaltung.web.html;
 
-public class HtmlOptionDto {
-
-    private final String textMessageKey;
-    private final String value;
-    private final boolean selected;
-
-    public HtmlOptionDto(String textMessageKey, String value, boolean selected) {
-        this.textMessageKey = textMessageKey;
-        this.value = value;
-        this.selected = selected;
-    }
-
-    public String getTextMessageKey() {
-        return textMessageKey;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public boolean isSelected() {
-        return selected;
-    }
+public record HtmlOptionDto(
+    String textMessageKey,
+    String value,
+    boolean selected
+) {
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlSelectDto.java b/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlSelectDto.java
index 7e5454f19..cdc9de92d 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlSelectDto.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/web/html/HtmlSelectDto.java
@@ -2,15 +2,7 @@ package org.synyx.urlaubsverwaltung.web.html;
 
 import java.util.List;
 
-public class HtmlSelectDto {
-
-    private final List<HtmlOptgroupDto> optgroups;
-
-    public HtmlSelectDto(List<HtmlOptgroupDto> optgroups) {
-        this.optgroups = optgroups;
-    }
-
-    public List<HtmlOptgroupDto> getOptgroups() {
-        return optgroups;
-    }
+public record HtmlSelectDto(
+    List<HtmlOptgroupDto> optgroups
+) {
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/web/pageable/PageableDefaultSizeChangedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/web/pageable/PageableDefaultSizeChangedEvent.java
index 8c0b255a5..07875e545 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/web/pageable/PageableDefaultSizeChangedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/web/pageable/PageableDefaultSizeChangedEvent.java
@@ -2,47 +2,11 @@ package org.synyx.urlaubsverwaltung.web.pageable;
 
 import org.synyx.urlaubsverwaltung.person.PersonId;
 
-import java.util.Objects;
-
 /**
  * Indicates that a {@linkplain org.synyx.urlaubsverwaltung.person.Person} has updated the default value for {@linkplain org.springframework.data.domain.Pageable} size.
  */
-public final class PageableDefaultSizeChangedEvent {
-
-    private final PersonId personId;
-    private final int newPageableDefaultSize;
-
-    public PageableDefaultSizeChangedEvent(PersonId personId, int newPageableDefaultSize) {
-        this.personId = personId;
-        this.newPageableDefaultSize = newPageableDefaultSize;
-    }
-
-    public PersonId getPersonId() {
-        return personId;
-    }
-
-    public int getNewPageableDefaultSize() {
-        return newPageableDefaultSize;
-    }
-
-    @Override
-    public String toString() {
-        return "PageableDefaultSizeChangedEvent{" +
-            "personId=" + personId +
-            ", newPageableDefaultSize=" + newPageableDefaultSize +
-            '}';
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        PageableDefaultSizeChangedEvent that = (PageableDefaultSizeChangedEvent) o;
-        return newPageableDefaultSize == that.newPageableDefaultSize && Objects.equals(personId, that.personId);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(personId, newPageableDefaultSize);
-    }
+public record PageableDefaultSizeChangedEvent(
+    PersonId personId,
+    int newPageableDefaultSize
+) {
 }


Test patch:
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/absence/AbsenceServiceImplTest.java b/src/test/java/org/synyx/urlaubsverwaltung/absence/AbsenceServiceImplTest.java
index 9debeb9fa..b8817a8b5 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/absence/AbsenceServiceImplTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/absence/AbsenceServiceImplTest.java
@@ -135,16 +135,16 @@ class AbsenceServiceImplTest {
 
         final List<AbsencePeriod> actualAbsences = sut.getOpenAbsences(List.of(batman), start, end);
         assertThat(actualAbsences).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ALLOWED);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(true);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ALLOWED);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(true);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isEmpty();
     }
 
     @Test
@@ -179,16 +179,16 @@ class AbsenceServiceImplTest {
 
         final List<AbsencePeriod> actualAbsences = sut.getOpenAbsences(List.of(batman), start, end);
         assertThat(actualAbsences).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ALLOWED);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ALLOWED);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
     }
 
     @Test
@@ -223,22 +223,22 @@ class AbsenceServiceImplTest {
 
         final List<AbsencePeriod> actualAbsences = sut.getOpenAbsences(List.of(batman), start, end);
         assertThat(actualAbsences).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ALLOWED);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ALLOWED);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ALLOWED);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ALLOWED);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
     }
 
     @Test
@@ -282,8 +282,8 @@ class AbsenceServiceImplTest {
         assertThat(actualAbsences).hasSize(2);
 
         assertThat(actualAbsences.get(0)).satisfies(absence -> {
-            assertThat(absence.getAbsenceRecords()).hasSize(1);
-            assertThat(absence.getAbsenceRecords().getFirst()).satisfies(record -> {
+            assertThat(absence.absenceRecords()).hasSize(1);
+            assertThat(absence.absenceRecords().getFirst()).satisfies(record -> {
                 assertThat(record.isHalfDayAbsence()).isTrue();
                 assertThat(record.getPerson()).isSameAs(batman);
                 assertThat(record.getMorning()).isPresent();
@@ -304,8 +304,8 @@ class AbsenceServiceImplTest {
         });
 
         assertThat(actualAbsences.get(1)).satisfies(absence -> {
-            assertThat(absence.getAbsenceRecords()).hasSize(1);
-            assertThat(absence.getAbsenceRecords().getFirst()).satisfies(record -> {
+            assertThat(absence.absenceRecords()).hasSize(1);
+            assertThat(absence.absenceRecords().getFirst()).satisfies(record -> {
                 assertThat(record.isHalfDayAbsence()).isTrue();
                 assertThat(record.getPerson()).isSameAs(batman);
                 assertThat(record.getMorning()).isEmpty();
@@ -353,13 +353,13 @@ class AbsenceServiceImplTest {
 
         final List<AbsencePeriod> actualAbsences = sut.getOpenAbsences(List.of(batman), start, end);
         assertThat(actualAbsences).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ACTIVE);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ACTIVE);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isEmpty();
     }
 
     @Test
@@ -389,13 +389,13 @@ class AbsenceServiceImplTest {
 
         final List<AbsencePeriod> actualAbsences = sut.getOpenAbsences(List.of(batman), start, end);
         assertThat(actualAbsences).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ACTIVE);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.ACTIVE);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
     }
 
     @Test
@@ -426,8 +426,8 @@ class AbsenceServiceImplTest {
         final List<AbsencePeriod> actualAbsences = sut.getOpenAbsences(List.of(batman), start, end);
         assertThat(actualAbsences).hasSize(1);
         assertThat(actualAbsences.getFirst()).satisfies(absence -> {
-            assertThat(absence.getAbsenceRecords()).hasSize(1);
-            assertThat(absence.getAbsenceRecords().getFirst()).satisfies(record -> {
+            assertThat(absence.absenceRecords()).hasSize(1);
+            assertThat(absence.absenceRecords().getFirst()).satisfies(record -> {
                 assertThat(record.isHalfDayAbsence()).isFalse();
                 assertThat(record.getPerson()).isSameAs(batman);
                 assertThat(record.getMorning()).isPresent();
@@ -481,8 +481,8 @@ class AbsenceServiceImplTest {
         assertThat(actualAbsences).hasSize(2);
 
         assertThat(actualAbsences.get(0)).satisfies(absence -> {
-            assertThat(absence.getAbsenceRecords()).hasSize(1);
-            assertThat(absence.getAbsenceRecords().getFirst()).satisfies(record -> {
+            assertThat(absence.absenceRecords()).hasSize(1);
+            assertThat(absence.absenceRecords().getFirst()).satisfies(record -> {
                 assertThat(record.isHalfDayAbsence()).isTrue();
                 assertThat(record.getPerson()).isSameAs(batman);
                 assertThat(record.getMorning()).isPresent();
@@ -503,8 +503,8 @@ class AbsenceServiceImplTest {
         });
 
         assertThat(actualAbsences.get(1)).satisfies(absence -> {
-            assertThat(absence.getAbsenceRecords()).hasSize(1);
-            assertThat(absence.getAbsenceRecords().getFirst()).satisfies(record -> {
+            assertThat(absence.absenceRecords()).hasSize(1);
+            assertThat(absence.absenceRecords().getFirst()).satisfies(record -> {
                 assertThat(record.isHalfDayAbsence()).isTrue();
                 assertThat(record.getPerson()).isSameAs(batman);
                 assertThat(record.getMorning()).isEmpty();
@@ -557,20 +557,20 @@ class AbsenceServiceImplTest {
         assertThat(actualAbsences).hasSize(2);
 
         // vacation
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isEmpty();
 
         // sick
-        assertThat(actualAbsences.get(1).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(1).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(1).getAbsenceRecords().get(0).getMorning()).isEmpty();
-        assertThat(actualAbsences.get(1).getAbsenceRecords().get(0).getNoon()).isNotEmpty();
-        assertThat(actualAbsences.get(1).getAbsenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(1337L);
-        assertThat(actualAbsences.get(1).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
+        assertThat(actualAbsences.get(1).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(1).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(1).absenceRecords().get(0).getMorning()).isEmpty();
+        assertThat(actualAbsences.get(1).absenceRecords().get(0).getNoon()).isNotEmpty();
+        assertThat(actualAbsences.get(1).absenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(1337L);
+        assertThat(actualAbsences.get(1).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
     }
 
     @Test
@@ -600,7 +600,7 @@ class AbsenceServiceImplTest {
 
         assertThat(actualAbsences).hasSize(1);
 
-        final List<AbsencePeriod.Record> absenceRecords = actualAbsences.get(0).getAbsenceRecords();
+        final List<AbsencePeriod.Record> absenceRecords = actualAbsences.get(0).absenceRecords();
         assertThat(absenceRecords).hasSize(1);
         assertThat(absenceRecords.get(0).getPerson()).isSameAs(batman);
         assertThat(absenceRecords.get(0).getDate()).isEqualTo(LocalDate.of(2021, MAY, 31));
@@ -636,7 +636,7 @@ class AbsenceServiceImplTest {
 
         assertThat(actualAbsences).hasSize(1);
 
-        final List<AbsencePeriod.Record> absenceRecords = actualAbsences.get(0).getAbsenceRecords();
+        final List<AbsencePeriod.Record> absenceRecords = actualAbsences.get(0).absenceRecords();
         assertThat(absenceRecords).hasSize(1);
         assertThat(absenceRecords.get(0).getPerson()).isSameAs(batman);
         assertThat(absenceRecords.get(0).getDate()).isEqualTo(LocalDate.of(2021, MAY, 31));
@@ -680,7 +680,7 @@ class AbsenceServiceImplTest {
 
         assertThat(actualAbsences.get(0)).satisfies(absence -> {
 
-            final List<AbsencePeriod.Record> absenceRecords = absence.getAbsenceRecords();
+            final List<AbsencePeriod.Record> absenceRecords = absence.absenceRecords();
             assertThat(absenceRecords).hasSize(30);
 
             // 1. May to 19. May -> vacation
@@ -705,8 +705,8 @@ class AbsenceServiceImplTest {
 
         // full public_holiday at 20th may
         assertThat(actualAbsences.get(1)).satisfies(absence -> {
-            assertThat(absence.getAbsenceRecords()).hasSize(1);
-            assertThat(absence.getAbsenceRecords().get(0)).satisfies(absenceRecord -> {
+            assertThat(absence.absenceRecords()).hasSize(1);
+            assertThat(absence.absenceRecords().get(0)).satisfies(absenceRecord -> {
                 assertThat(absenceRecord.isHalfDayAbsence()).isFalse();
                 assertThat(absenceRecord.getDate()).isEqualTo(LocalDate.of(2021, MAY, 20));
                 assertThat(absenceRecord.getMorning()).isPresent();
@@ -773,7 +773,7 @@ class AbsenceServiceImplTest {
 
         assertThat(actualAbsences.get(0)).satisfies(absence -> {
 
-            final List<AbsencePeriod.Record> absenceRecords = absence.getAbsenceRecords();
+            final List<AbsencePeriod.Record> absenceRecords = absence.absenceRecords();
             assertThat(absenceRecords).hasSize(31);
 
             // 1. December to 23. December -> vacation
@@ -801,8 +801,8 @@ class AbsenceServiceImplTest {
 
         // half public_holiday at 24th december
         assertThat(actualAbsences.get(1)).satisfies(absence -> {
-            assertThat(absence.getAbsenceRecords()).hasSize(1);
-            assertThat(absence.getAbsenceRecords().get(0)).satisfies(absenceRecord -> {
+            assertThat(absence.absenceRecords()).hasSize(1);
+            assertThat(absence.absenceRecords().get(0)).satisfies(absenceRecord -> {
                 assertThat(absenceRecord.isHalfDayAbsence()).isTrue();
                 assertThat(absenceRecord.getDate()).isEqualTo(LocalDate.of(2021, DECEMBER, 24));
                 assertThat(absenceRecord.getMorning()).isEmpty();
@@ -858,7 +858,7 @@ class AbsenceServiceImplTest {
 
         assertThat(actualAbsences.get(0)).satisfies(absence -> {
 
-            final List<AbsencePeriod.Record> absenceRecords = absence.getAbsenceRecords();
+            final List<AbsencePeriod.Record> absenceRecords = absence.absenceRecords();
             assertThat(absenceRecords).hasSize(31);
 
             // 1. December to 23. December -> vacation
@@ -886,8 +886,8 @@ class AbsenceServiceImplTest {
 
         // half public_holiday at 24th december
         assertThat(actualAbsences.get(1)).satisfies(absence -> {
-            assertThat(absence.getAbsenceRecords()).hasSize(1);
-            assertThat(absence.getAbsenceRecords().get(0)).satisfies(absenceRecord -> {
+            assertThat(absence.absenceRecords()).hasSize(1);
+            assertThat(absence.absenceRecords().get(0)).satisfies(absenceRecord -> {
                 assertThat(absenceRecord.isHalfDayAbsence()).isTrue();
                 assertThat(absenceRecord.getDate()).isEqualTo(LocalDate.of(2021, DECEMBER, 24));
                 assertThat(absenceRecord.getMorning()).isPresent();
@@ -973,16 +973,16 @@ class AbsenceServiceImplTest {
 
         final List<AbsencePeriod> actualAbsences = sut.getClosedAbsences(List.of(batman), start, end);
         assertThat(actualAbsences).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(true);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(true);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isEmpty();
     }
 
     @Test
@@ -1017,16 +1017,16 @@ class AbsenceServiceImplTest {
 
         final List<AbsencePeriod> actualAbsences = sut.getClosedAbsences(List.of(batman), start, end);
         assertThat(actualAbsences).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
     }
 
     @Test
@@ -1061,22 +1061,22 @@ class AbsenceServiceImplTest {
 
         final List<AbsencePeriod> actualAbsences = sut.getClosedAbsences(List.of(batman), start, end);
         assertThat(actualAbsences).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isPresent();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isPresent();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isPresent();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isPresent();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getTypeId)).hasValue(Optional.of(1L));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getCategory)).hasValue(Optional.of("HOLIDAY"));
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::isVisibleToEveryone)).hasValue(false);
     }
 
     @Test
@@ -1106,13 +1106,13 @@ class AbsenceServiceImplTest {
 
         final List<AbsencePeriod> actualAbsences = sut.getClosedAbsences(List.of(batman), start, end);
         assertThat(actualAbsences).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isEmpty();
     }
 
     @Test
@@ -1142,13 +1142,13 @@ class AbsenceServiceImplTest {
 
         final List<AbsencePeriod> actualAbsences = sut.getClosedAbsences(List.of(batman), start, end);
         assertThat(actualAbsences).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getStatus)).hasValue(AbsencePeriod.AbsenceStatus.CANCELLED);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
     }
 
     @Test
@@ -1190,20 +1190,20 @@ class AbsenceServiceImplTest {
         assertThat(actualAbsences).hasSize(2);
 
         // vacation
-        assertThat(actualAbsences.get(0).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning()).isNotEmpty();
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
-        assertThat(actualAbsences.get(0).getAbsenceRecords().get(0).getNoon()).isEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning()).isNotEmpty();
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(42L);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getMorning().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.VACATION);
+        assertThat(actualAbsences.get(0).absenceRecords().get(0).getNoon()).isEmpty();
 
         // sick
-        assertThat(actualAbsences.get(1).getAbsenceRecords()).hasSize(1);
-        assertThat(actualAbsences.get(1).getAbsenceRecords().get(0).getPerson()).isSameAs(batman);
-        assertThat(actualAbsences.get(1).getAbsenceRecords().get(0).getMorning()).isEmpty();
-        assertThat(actualAbsences.get(1).getAbsenceRecords().get(0).getNoon()).isNotEmpty();
-        assertThat(actualAbsences.get(1).getAbsenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(1337L);
-        assertThat(actualAbsences.get(1).getAbsenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
+        assertThat(actualAbsences.get(1).absenceRecords()).hasSize(1);
+        assertThat(actualAbsences.get(1).absenceRecords().get(0).getPerson()).isSameAs(batman);
+        assertThat(actualAbsences.get(1).absenceRecords().get(0).getMorning()).isEmpty();
+        assertThat(actualAbsences.get(1).absenceRecords().get(0).getNoon()).isNotEmpty();
+        assertThat(actualAbsences.get(1).absenceRecords().get(0).getNoon().flatMap(AbsencePeriod.RecordInfo::getId)).hasValue(1337L);
+        assertThat(actualAbsences.get(1).absenceRecords().get(0).getNoon().map(AbsencePeriod.RecordInfo::getAbsenceType)).hasValue(AbsencePeriod.AbsenceType.SICK);
     }
 
     @Test
@@ -1233,7 +1233,7 @@ class AbsenceServiceImplTest {
 
         assertThat(actualAbsences).hasSize(1);
 
-        final List<AbsencePeriod.Record> absenceRecords = actualAbsences.get(0).getAbsenceRecords();
+        final List<AbsencePeriod.Record> absenceRecords = actualAbsences.get(0).absenceRecords();
         assertThat(absenceRecords).hasSize(1);
         assertThat(absenceRecords.get(0).getPerson()).isSameAs(batman);
         assertThat(absenceRecords.get(0).getDate()).isEqualTo(LocalDate.of(2021, MAY, 31));
@@ -1269,7 +1269,7 @@ class AbsenceServiceImplTest {
 
         assertThat(actualAbsences).hasSize(1);
 
-        final List<AbsencePeriod.Record> absenceRecords = actualAbsences.get(0).getAbsenceRecords();
+        final List<AbsencePeriod.Record> absenceRecords = actualAbsences.get(0).absenceRecords();
         assertThat(absenceRecords).hasSize(1);
         assertThat(absenceRecords.get(0).getPerson()).isSameAs(batman);
         assertThat(absenceRecords.get(0).getDate()).isEqualTo(LocalDate.of(2021, MAY, 31));
@@ -1313,7 +1313,7 @@ class AbsenceServiceImplTest {
 
         assertThat(actualAbsences.get(0)).satisfies(absence -> {
 
-            final List<AbsencePeriod.Record> absenceRecords = absence.getAbsenceRecords();
+            final List<AbsencePeriod.Record> absenceRecords = absence.absenceRecords();
             assertThat(absenceRecords).hasSize(30);
 
             // 1. May to 19. May -> vacation
@@ -1338,8 +1338,8 @@ class AbsenceServiceImplTest {
 
         // full public_holiday at 20th may
         assertThat(actualAbsences.get(1)).satisfies(absence -> {
-            assertThat(absence.getAbsenceRecords()).hasSize(1);
-            assertThat(absence.getAbsenceRecords().get(0)).satisfies(absenceRecord -> {
+            assertThat(absence.absenceRecords()).hasSize(1);
+            assertThat(absence.absenceRecords().get(0)).satisfies(absenceRecord -> {
                 assertThat(absenceRecord.isHalfDayAbsence()).isFalse();
                 assertThat(absenceRecord.getDate()).isEqualTo(LocalDate.of(2021, MAY, 20));
                 assertThat(absenceRecord.getMorning()).isPresent();
@@ -1406,7 +1406,7 @@ class AbsenceServiceImplTest {
 
         assertThat(actualAbsences.get(0)).satisfies(absence -> {
 
-            final List<AbsencePeriod.Record> absenceRecords = absence.getAbsenceRecords();
+            final List<AbsencePeriod.Record> absenceRecords = absence.absenceRecords();
             assertThat(absenceRecords).hasSize(31);
 
             // 1. December to 23. December -> vacation
@@ -1434,8 +1434,8 @@ class AbsenceServiceImplTest {
 
         // half public_holiday at 24th december
         assertThat(actualAbsences.get(1)).satisfies(absence -> {
-            assertThat(absence.getAbsenceRecords()).hasSize(1);
-            assertThat(absence.getAbsenceRecords().get(0)).satisfies(absenceRecord -> {
+            assertThat(absence.absenceRecords()).hasSize(1);
+            assertThat(absence.absenceRecords().get(0)).satisfies(absenceRecord -> {
                 assertThat(absenceRecord.isHalfDayAbsence()).isTrue();
                 assertThat(absenceRecord.getDate()).isEqualTo(LocalDate.of(2021, DECEMBER, 24));
                 assertThat(absenceRecord.getMorning()).isEmpty();
@@ -1491,7 +1491,7 @@ class AbsenceServiceImplTest {
 
         assertThat(actualAbsences.get(0)).satisfies(absence -> {
 
-            final List<AbsencePeriod.Record> absenceRecords = absence.getAbsenceRecords();
+            final List<AbsencePeriod.Record> absenceRecords = absence.absenceRecords();
             assertThat(absenceRecords).hasSize(31);
 
             // 1. December to 23. December -> vacation
@@ -1519,8 +1519,8 @@ class AbsenceServiceImplTest {
 
         // half public_holiday at 24th december
         assertThat(actualAbsences.get(1)).satisfies(absence -> {
-            assertThat(absence.getAbsenceRecords()).hasSize(1);
-            assertThat(absence.getAbsenceRecords().get(0)).satisfies(absenceRecord -> {
+            assertThat(absence.absenceRecords()).hasSize(1);
+            assertThat(absence.absenceRecords().get(0)).satisfies(absenceRecord -> {
                 assertThat(absenceRecord.isHalfDayAbsence()).isTrue();
                 assertThat(absenceRecord.getDate()).isEqualTo(LocalDate.of(2021, DECEMBER, 24));
                 assertThat(absenceRecord.getMorning()).isPresent();
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/application/application/ApplicationTest.java b/src/test/java/org/synyx/urlaubsverwaltung/application/application/ApplicationTest.java
index a9d320ac0..20c619a50 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/application/application/ApplicationTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/application/application/ApplicationTest.java
@@ -82,9 +82,9 @@ class ApplicationTest {
 
         Period period = application.getPeriod();
 
-        assertThat(period.getStartDate()).isEqualTo(startDate);
-        assertThat(period.getEndDate()).isEqualTo(endDate);
-        assertThat(period.getDayLength()).isEqualTo(DayLength.FULL);
+        assertThat(period.startDate()).isEqualTo(startDate);
+        assertThat(period.endDate()).isEqualTo(endDate);
+        assertThat(period.dayLength()).isEqualTo(DayLength.FULL);
     }
 
     // Start and end time ----------------------------------------------------------------------------------------------
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/overtime/LeftOvertimeTest.java b/src/test/java/org/synyx/urlaubsverwaltung/overtime/LeftOvertimeTest.java
index 74868fff8..d2fa9cd60 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/overtime/LeftOvertimeTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/overtime/LeftOvertimeTest.java
@@ -13,7 +13,7 @@ class LeftOvertimeTest {
 
         final LeftOvertime identity = LeftOvertime.identity();
 
-        assertThat(identity.getLeftOvertimeOverall()).isEqualTo(Duration.ZERO);
-        assertThat(identity.getLeftOvertimeDateRange()).isEqualTo(Duration.ZERO);
+        assertThat(identity.leftOvertimeOverall()).isEqualTo(Duration.ZERO);
+        assertThat(identity.leftOvertimeDateRange()).isEqualTo(Duration.ZERO);
     }
 }
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/overtime/OvertimeServiceImplTest.java b/src/test/java/org/synyx/urlaubsverwaltung/overtime/OvertimeServiceImplTest.java
index b2f9dd050..a5aa00ff7 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/overtime/OvertimeServiceImplTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/overtime/OvertimeServiceImplTest.java
@@ -470,12 +470,12 @@ class OvertimeServiceImplTest {
             .containsKey(person2);
 
         final LeftOvertime leftOvertime = actual.get(person);
-        assertThat(leftOvertime.getLeftOvertimeOverall()).isEqualTo(Duration.ofHours(2));
-        assertThat(leftOvertime.getLeftOvertimeDateRange()).isEqualTo(Duration.ofHours(1));
+        assertThat(leftOvertime.leftOvertimeOverall()).isEqualTo(Duration.ofHours(2));
+        assertThat(leftOvertime.leftOvertimeDateRange()).isEqualTo(Duration.ofHours(1));
 
         final LeftOvertime leftOvertime2 = actual.get(person2);
-        assertThat(leftOvertime2.getLeftOvertimeOverall()).isEqualTo(Duration.ofHours(20));
-        assertThat(leftOvertime2.getLeftOvertimeDateRange()).isEqualTo(Duration.ofHours(10));
+        assertThat(leftOvertime2.leftOvertimeOverall()).isEqualTo(Duration.ofHours(20));
+        assertThat(leftOvertime2.leftOvertimeDateRange()).isEqualTo(Duration.ofHours(10));
     }
 
     @Test
@@ -544,12 +544,12 @@ class OvertimeServiceImplTest {
             .containsKey(person2);
 
         final LeftOvertime leftOvertime = actual.get(person);
-        assertThat(leftOvertime.getLeftOvertimeOverall()).isEqualTo(Duration.ofMinutes(30));
-        assertThat(leftOvertime.getLeftOvertimeDateRange()).isEqualTo(Duration.ofHours(1));
+        assertThat(leftOvertime.leftOvertimeOverall()).isEqualTo(Duration.ofMinutes(30));
+        assertThat(leftOvertime.leftOvertimeDateRange()).isEqualTo(Duration.ofHours(1));
 
         final LeftOvertime leftOvertime2 = actual.get(person2);
-        assertThat(leftOvertime2.getLeftOvertimeOverall()).isEqualTo(Duration.ofHours(20));
-        assertThat(leftOvertime2.getLeftOvertimeDateRange()).isEqualTo(Duration.ofHours(10));
+        assertThat(leftOvertime2.leftOvertimeOverall()).isEqualTo(Duration.ofHours(20));
+        assertThat(leftOvertime2.leftOvertimeDateRange()).isEqualTo(Duration.ofHours(10));
     }
 
     @Test
@@ -574,8 +574,8 @@ class OvertimeServiceImplTest {
 
         final LeftOvertime leftOvertime = actual.get(personWithoutOvertime);
         assertThat(leftOvertime).isNotNull();
-        assertThat(leftOvertime.getLeftOvertimeOverall()).isEqualTo(Duration.ZERO);
-        assertThat(leftOvertime.getLeftOvertimeDateRange()).isEqualTo(Duration.ZERO);
+        assertThat(leftOvertime.leftOvertimeOverall()).isEqualTo(Duration.ZERO);
+        assertThat(leftOvertime.leftOvertimeDateRange()).isEqualTo(Duration.ZERO);
     }
 
     @Test
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/period/PeriodTest.java b/src/test/java/org/synyx/urlaubsverwaltung/period/PeriodTest.java
index 63527de7b..fb15c8cda 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/period/PeriodTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/period/PeriodTest.java
@@ -45,9 +45,9 @@ class PeriodTest {
 
         Period period = new Period(startDate, endDate, DayLength.FULL);
 
-        assertThat(period.getStartDate()).isEqualTo(startDate);
-        assertThat(period.getEndDate()).isEqualTo(endDate);
-        assertThat(period.getDayLength()).isEqualTo(DayLength.FULL);
+        assertThat(period.startDate()).isEqualTo(startDate);
+        assertThat(period.endDate()).isEqualTo(endDate);
+        assertThat(period.dayLength()).isEqualTo(DayLength.FULL);
     }
 
     @Test
@@ -57,8 +57,8 @@ class PeriodTest {
 
         Period period = new Period(date, date, DayLength.MORNING);
 
-        assertThat(period.getStartDate()).isEqualTo(date);
-        assertThat(period.getEndDate()).isEqualTo(date);
-        assertThat(period.getDayLength()).isEqualTo(DayLength.MORNING);
+        assertThat(period.startDate()).isEqualTo(date);
+        assertThat(period.endDate()).isEqualTo(date);
+        assertThat(period.dayLength()).isEqualTo(DayLength.MORNING);
     }
 }
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/person/PersonServiceIT.java b/src/test/java/org/synyx/urlaubsverwaltung/person/PersonServiceIT.java
index 2157d2aa2..ebc7f24cb 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/person/PersonServiceIT.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/person/PersonServiceIT.java
@@ -122,7 +122,7 @@ class PersonServiceIT extends SingleTenantTestContainersBase {
 
         assertThat(personRepository.existsById(personId)).isTrue();
         assertThat(personRepository.findByUsernameIgnoreCase("user").get().getPermissions()).containsExactly(USER);
-        assertThat(personBasedataService.getBasedataByPersonId(personId).get().getPersonId().value()).isEqualTo(personId);
+        assertThat(personBasedataService.getBasedataByPersonId(personId).get().personId().value()).isEqualTo(personId);
         assertThat(personRepository.findByPermissionsNotContainingAndNotificationsContainingOrderByFirstNameAscLastNameAsc(OFFICE, MailNotification.NOTIFICATION_EMAIL_APPLICATION_ALLOWED)).hasSize(1);
         assertThat(personRepository.countByPermissionsContainingAndIdNotIn(USER, List.of(personId + 1))).isOne();
         assertThat(applicationService.getApplicationById(applicationWithId.getId())).hasValue(applicationWithId);
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataServiceImplTest.java b/src/test/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataServiceImplTest.java
index 4e61bf4a8..de1596e92 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataServiceImplTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataServiceImplTest.java
@@ -44,9 +44,9 @@ class PersonBasedataServiceImplTest {
 
         final Optional<PersonBasedata> basedata = sut.getBasedataByPersonId(1);
         assertThat(basedata).hasValueSatisfying(personBasedata -> {
-            assertThat(personBasedata.getPersonId()).isEqualTo(new PersonId(1L));
-            assertThat(personBasedata.getPersonnelNumber()).isEqualTo("1337");
-            assertThat(personBasedata.getAdditionalInformation()).isEqualTo("Some additional Information");
+            assertThat(personBasedata.personId()).isEqualTo(new PersonId(1L));
+            assertThat(personBasedata.personnelNumber()).isEqualTo("1337");
+            assertThat(personBasedata.additionalInformation()).isEqualTo("Some additional Information");
         });
     }
 
@@ -84,15 +84,15 @@ class PersonBasedataServiceImplTest {
             .containsKeys(new PersonId(1L), new PersonId(2L));
 
         assertThat(actual.get(new PersonId(1L))).satisfies(basedata -> {
-            assertThat(basedata.getPersonId()).isEqualTo(new PersonId(1L));
-            assertThat(basedata.getPersonnelNumber()).isEqualTo("1337");
-            assertThat(basedata.getAdditionalInformation()).isEqualTo("Some additional Information");
+            assertThat(basedata.personId()).isEqualTo(new PersonId(1L));
+            assertThat(basedata.personnelNumber()).isEqualTo("1337");
+            assertThat(basedata.additionalInformation()).isEqualTo("Some additional Information");
         });
 
         assertThat(actual.get(new PersonId(2L))).satisfies(basedata -> {
-            assertThat(basedata.getPersonId()).isEqualTo(new PersonId(2L));
-            assertThat(basedata.getPersonnelNumber()).isEqualTo("1887");
-            assertThat(basedata.getAdditionalInformation()).isNull();
+            assertThat(basedata.personId()).isEqualTo(new PersonId(2L));
+            assertThat(basedata.personnelNumber()).isEqualTo("1887");
+            assertThat(basedata.additionalInformation()).isNull();
         });
     }
 
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataViewControllerTest.java b/src/test/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataViewControllerTest.java
index 757518612..d17273165 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataViewControllerTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataViewControllerTest.java
@@ -103,9 +103,9 @@ class PersonBasedataViewControllerTest {
         verify(personBasedataService).update(captor.capture());
 
         final PersonBasedata personBasedata = captor.getValue();
-        assertThat(personBasedata.getPersonId()).isEqualTo(new PersonId(1L));
-        assertThat(personBasedata.getPersonnelNumber()).isEqualTo("1337");
-        assertThat(personBasedata.getAdditionalInformation()).isEqualTo("Additional Information");
+        assertThat(personBasedata.personId()).isEqualTo(new PersonId(1L));
+        assertThat(personBasedata.personnelNumber()).isEqualTo("1337");
+        assertThat(personBasedata.additionalInformation()).isEqualTo("Additional Information");
     }
 
     @Test
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysDetailedStatisticsCsvExportServiceTest.java b/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysDetailedStatisticsCsvExportServiceTest.java
index bd3441589..eeb28aee4 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysDetailedStatisticsCsvExportServiceTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysDetailedStatisticsCsvExportServiceTest.java
@@ -119,7 +119,7 @@ class SickDaysDetailedStatisticsCsvExportServiceTest {
         sickNoteTypeSickChild.setCategory(SICK_NOTE_CHILD);
         sickNoteTypeSickChild.setMessageKey("application.data.sicknotetype.sicknotechild");
 
-        final Map<LocalDate, WorkingDayInformation> workingTimeByDate = workingTimeMondayToFriday(period.getStartDate(), period.getEndDate());
+        final Map<LocalDate, WorkingDayInformation> workingTimeByDate = workingTimeMondayToFriday(period.startDate(), period.endDate());
         final WorkingTimeCalendar workingTimeCalendar = new WorkingTimeCalendar(workingTimeByDate);
 
         final SickNote sickNote = SickNote.builder()
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewViewControllerTest.java b/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewViewControllerTest.java
index ea511b692..c02f33bd6 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewViewControllerTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysOverviewViewControllerTest.java
@@ -1,6 +1,7 @@
 package org.synyx.urlaubsverwaltung.sicknote.sickdays;
 
 
+import org.assertj.core.api.InstanceOfAssertFactories;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
@@ -13,8 +14,8 @@ import org.springframework.data.domain.PageImpl;
 import org.springframework.data.domain.PageRequest;
 import org.springframework.data.domain.Sort;
 import org.springframework.data.web.PageableHandlerMethodArgumentResolver;
-import org.springframework.test.web.servlet.ResultActions;
-import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
+import org.springframework.test.web.servlet.assertj.MockMvcTester;
+import org.springframework.test.web.servlet.assertj.MvcTestResult;
 import org.synyx.urlaubsverwaltung.absence.DateRange;
 import org.synyx.urlaubsverwaltung.person.Person;
 import org.synyx.urlaubsverwaltung.person.PersonService;
@@ -22,6 +23,7 @@ import org.synyx.urlaubsverwaltung.search.PageableSearchQuery;
 import org.synyx.urlaubsverwaltung.sicknote.sicknote.SickNote;
 import org.synyx.urlaubsverwaltung.sicknote.sicknotetype.SickNoteType;
 import org.synyx.urlaubsverwaltung.web.DateFormatAware;
+import org.synyx.urlaubsverwaltung.web.FilterPeriod;
 import org.synyx.urlaubsverwaltung.workingtime.WorkingTimeCalendar;
 import org.synyx.urlaubsverwaltung.workingtime.WorkingTimeCalendar.WorkingDayInformation;
 
@@ -41,18 +43,11 @@ import java.util.stream.Stream;
 import static java.math.BigDecimal.ZERO;
 import static java.time.temporal.TemporalAdjusters.firstDayOfYear;
 import static java.time.temporal.TemporalAdjusters.lastDayOfYear;
-import static org.hamcrest.CoreMatchers.allOf;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.Matchers.contains;
-import static org.hamcrest.Matchers.hasProperty;
+import static org.assertj.core.api.Assertions.as;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.when;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view;
-import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
 import static org.synyx.urlaubsverwaltung.period.DayLength.FULL;
 import static org.synyx.urlaubsverwaltung.person.Role.OFFICE;
 import static org.synyx.urlaubsverwaltung.person.Role.USER;
@@ -93,7 +88,7 @@ class SickDaysOverviewViewControllerTest {
 
     @ParameterizedTest
     @MethodSource("dateInputAndIsoDateTuple")
-    void sickDaysRedirectsToStatisticsAfterIncorrectPeriodForStartDate(String givenDateString, LocalDate givenDate) throws Exception {
+    void sickDaysRedirectsToStatisticsAfterIncorrectPeriodForStartDate(String givenDateString, LocalDate givenDate) {
 
         final Locale locale = Locale.GERMAN;
         final int year = clockYear();
@@ -101,21 +96,24 @@ class SickDaysOverviewViewControllerTest {
         when(sickDaysStatisticsService.getAll(any(), any(), any(), any())).thenReturn(new PageImpl<>(List.of()));
         when(dateFormatAware.parse(givenDateString, locale)).thenReturn(Optional.of(givenDate));
 
-        perform(
-            get("/web/sickdays")
-                .locale(locale)
-                .param("from", givenDateString)
-        )
-            .andExpect(status().isOk())
-            .andExpect(model().attribute("today", LocalDate.now(clock)))
-            .andExpect(model().attribute("from", givenDate))
-            .andExpect(model().attribute("to", LocalDate.of(year, 12, 31)))
-            .andExpect(view().name("sicknote/sick_days"));
+        final MvcTestResult result = mockmvc().get()
+            .uri("/web/sickdays")
+            .locale(locale)
+            .param("from", givenDateString)
+            .exchange();
+
+        assertThat(result)
+            .hasStatusOk()
+            .hasViewName("sicknote/sick_days")
+            .model()
+            .containsEntry("today", LocalDate.now(clock))
+            .containsEntry("from", givenDate)
+            .containsEntry("to", LocalDate.of(year, 12, 31));
     }
 
     @ParameterizedTest
     @MethodSource("dateInputAndIsoDateTuple")
-    void sickDaysRedirectsToStatisticsAfterIncorrectPeriodForEndDate(String givenDateString, LocalDate givenDate) throws Exception {
+    void sickDaysRedirectsToStatisticsAfterIncorrectPeriodForEndDate(String givenDateString, LocalDate givenDate) {
 
         final Locale locale = Locale.GERMAN;
 
@@ -127,35 +125,43 @@ class SickDaysOverviewViewControllerTest {
         when(dateFormatAware.parse(any(), eq(locale))).thenReturn(Optional.of(fromDate));
         when(dateFormatAware.parse(givenDateString, locale)).thenReturn(Optional.of(givenDate));
 
-        perform(
-            get("/web/sickdays")
-                .locale(locale)
-                .param("to", givenDateString)
-        )
-            .andExpect(status().isOk())
-            .andExpect(model().attribute("today", LocalDate.now(clock)))
-            .andExpect(model().attribute("from", fromDate))
-            .andExpect(model().attribute("to", givenDate))
-            .andExpect(view().name("sicknote/sick_days"));
+        final MvcTestResult result = mockmvc().get()
+            .uri("/web/sickdays")
+            .locale(locale)
+            .param("to", givenDateString)
+            .exchange();
+
+        assertThat(result)
+            .hasStatusOk()
+            .hasViewName("sicknote/sick_days")
+            .model()
+            .containsEntry("today", LocalDate.now(clock))
+            .containsEntry("from", fromDate)
+            .containsEntry("to", givenDate);
     }
 
     @Test
-    void filterSickNotesWithNullDates() throws Exception {
+    void filterSickNotesWithNullDates() {
 
         final int year = Year.now(clock).getValue();
 
         when(sickDaysStatisticsService.getAll(any(), any(), any(), any())).thenReturn(new PageImpl<>(List.of()));
 
-        perform(get("/web/sickdays"))
-            .andExpect(status().isOk())
-            .andExpect(model().attribute("today", LocalDate.now(clock)))
-            .andExpect(model().attribute("from", LocalDate.of(year, 1, 1)))
-            .andExpect(model().attribute("to", LocalDate.of(year, 12, 31)))
-            .andExpect(view().name("sicknote/sick_days"));
+        final MvcTestResult result = mockmvc().get()
+            .uri("/web/sickdays")
+            .exchange();
+
+        assertThat(result)
+            .hasStatusOk()
+            .hasViewName("sicknote/sick_days")
+            .model()
+            .containsEntry("today", LocalDate.now(clock))
+            .containsEntry("from", LocalDate.of(year, 1, 1))
+            .containsEntry("to", LocalDate.of(year, 12, 31));
     }
 
     @Test
-    void periodsSickNotesWithDateRangeWithRole() throws Exception {
+    void periodsSickNotesWithDateRangeWithRole() {
 
         final Locale locale = Locale.GERMAN;
 
@@ -235,62 +241,34 @@ class SickDaysOverviewViewControllerTest {
         when(dateFormatAware.parse(requestStartDate.toString(), locale)).thenReturn(Optional.of(requestStartDate));
         when(dateFormatAware.parse(requestEndDate.toString(), locale)).thenReturn(Optional.of(requestEndDate));
 
-        perform(get("/web/sickdays")
+        final MvcTestResult result = mockmvc().get()
+            .uri("/web/sickdays")
             .locale(locale)
             .param("from", requestStartDate.toString())
             .param("to", requestEndDate.toString())
             .param("page", "2")
             .param("size", "50")
-        )
-            .andExpect(status().isOk())
-            .andExpect(model().attribute("sickDaysStatistics", contains(
-                allOf(
-                    hasProperty("personId", is(1L)),
-                    hasProperty("personAvatarUrl", is("")),
-                    hasProperty("personnelNumber", is("0000001337")),
-                    hasProperty("personFirstName", is("FirstName one")),
-                    hasProperty("personLastName", is("LastName one")),
-                    hasProperty("personNiceName", is("FirstName one LastName one")),
-                    hasProperty("amountSickDays", is(BigDecimal.valueOf(15))),
-                    hasProperty("amountSickDaysWithAUB", is(BigDecimal.valueOf(6))),
-                    hasProperty("amountChildSickDays", is(ZERO)),
-                    hasProperty("amountChildSickDaysWithAUB", is(ZERO))
-                ),
-                allOf(
-                    hasProperty("personId", is(2L)),
-                    hasProperty("personAvatarUrl", is("")),
-                    hasProperty("personnelNumber", is("0000000042")),
-                    hasProperty("personFirstName", is("FirstName two")),
-                    hasProperty("personLastName", is("LastName two")),
-                    hasProperty("personNiceName", is("FirstName two LastName two")),
-                    hasProperty("amountSickDays", is(ZERO)),
-                    hasProperty("amountSickDaysWithAUB", is(ZERO)),
-                    hasProperty("amountChildSickDays", is(BigDecimal.valueOf(19))),
-                    hasProperty("amountChildSickDaysWithAUB", is(BigDecimal.valueOf(5)))
-                ),
-                allOf(
-                    hasProperty("personId", is(3L)),
-                    hasProperty("personAvatarUrl", is("")),
-                    hasProperty("personnelNumber", is("0000000021")),
-                    hasProperty("personFirstName", is("FirstName three")),
-                    hasProperty("personLastName", is("LastName three")),
-                    hasProperty("personNiceName", is("FirstName three LastName three")),
-                    hasProperty("amountSickDays", is(ZERO)),
-                    hasProperty("amountSickDaysWithAUB", is(ZERO)),
-                    hasProperty("amountChildSickDays", is(ZERO)),
-                    hasProperty("amountChildSickDaysWithAUB", is(ZERO))
-                )
-            )))
-            .andExpect(model().attribute("showPersonnelNumberColumn", true))
-            .andExpect(model().attribute("from", requestStartDate))
-            .andExpect(model().attribute("to", requestEndDate))
-            .andExpect(model().attribute("period", hasProperty("startDate", is(requestStartDate))))
-            .andExpect(model().attribute("period", hasProperty("endDate", is(requestEndDate))))
-            .andExpect(view().name("sicknote/sick_days"));
+            .exchange();
+
+        assertThat(result)
+            .hasStatusOk()
+            .hasViewName("sicknote/sick_days")
+            .model()
+            .containsEntry("showPersonnelNumberColumn", true)
+            .containsEntry("today", LocalDate.now(clock))
+            .containsEntry("from", requestStartDate)
+            .containsEntry("to", requestEndDate)
+            .containsEntry("period", new FilterPeriod(requestStartDate, requestEndDate))
+            .extractingByKey("statisticsPagination")
+            .extracting("page")
+            .extracting("content", as(InstanceOfAssertFactories.LIST))
+            .contains(new SickDaysOverviewDto(1L, "", "0000001337", "FirstName one", "LastName one", "FirstName one LastName one", BigDecimal.valueOf(15), BigDecimal.valueOf(6), ZERO, ZERO))
+            .contains(new SickDaysOverviewDto(2L, "", "0000000042", "FirstName two", "LastName two", "FirstName two LastName two", ZERO, ZERO, BigDecimal.valueOf(19), BigDecimal.valueOf(5)))
+            .contains(new SickDaysOverviewDto(3L, "", "0000000021", "FirstName three", "LastName three", "FirstName three LastName three", ZERO, ZERO, ZERO, ZERO));
     }
 
     @Test
-    void periodsSickNotesWithDateWithoutRange() throws Exception {
+    void periodsSickNotesWithDateWithoutRange() {
 
         final Person office = new Person();
         office.setId(1L);
@@ -307,24 +285,26 @@ class SickDaysOverviewViewControllerTest {
         when(sickDaysStatisticsService.getAll(office, startDate, endDate, pageableSearchQuery))
             .thenReturn(new PageImpl<>(List.of()));
 
-        final ResultActions resultActions = perform(get("/web/sickdays")
+
+        final MvcTestResult result = mockmvc().get()
+            .uri("/web/sickdays")
             .param("from", "01.01." + year)
             .param("to", "31.12." + year)
             .param("page", "1")
             .param("size", "50")
-        );
-
-        resultActions
-            .andExpect(status().isOk())
-            .andExpect(model().attribute("from", startDate))
-            .andExpect(model().attribute("to", endDate))
-            .andExpect(model().attribute("period", hasProperty("startDate", is(startDate))))
-            .andExpect(model().attribute("period", hasProperty("endDate", is(endDate))))
-            .andExpect(view().name("sicknote/sick_days"));
+            .exchange();
+
+        assertThat(result)
+            .hasStatusOk()
+            .hasViewName("sicknote/sick_days")
+            .model()
+            .containsEntry("from", startDate)
+            .containsEntry("to", endDate)
+            .containsEntry("period", new FilterPeriod(startDate, endDate));
     }
 
     @Test
-    void sickNotesWithoutPersonnelNumberColumn() throws Exception {
+    void sickNotesWithoutPersonnelNumberColumn() {
 
         final Locale locale = Locale.GERMAN;
 
@@ -346,16 +326,20 @@ class SickDaysOverviewViewControllerTest {
         when(dateFormatAware.parse(requestStartDate.toString(), locale)).thenReturn(Optional.of(requestStartDate));
         when(dateFormatAware.parse(requestEndDate.toString(), locale)).thenReturn(Optional.of(requestEndDate));
 
-        perform(
-            get("/web/sickdays")
-                .locale(locale)
-                .param("from", requestStartDate.toString())
-                .param("to", requestEndDate.toString())
-                .param("page", "2")
-                .param("size", "50")
-        )
-            .andExpect(model().attribute("showPersonnelNumberColumn", false))
-            .andExpect(view().name("sicknote/sick_days"));
+        final MvcTestResult result = mockmvc().get()
+            .uri("/web/sickdays")
+            .locale(locale)
+            .param("from", requestStartDate.toString())
+            .param("to", requestEndDate.toString())
+            .param("page", "2")
+            .param("size", "50")
+            .exchange();
+
+        assertThat(result)
+            .hasStatusOk()
+            .hasViewName("sicknote/sick_days")
+            .model()
+            .containsEntry("showPersonnelNumberColumn", false);
     }
 
     private Map<LocalDate, WorkingDayInformation> buildWorkingTimeByDate(LocalDate from, LocalDate to, Function<LocalDate, WorkingDayInformation> dayLengthProvider) {
@@ -370,10 +354,11 @@ class SickDaysOverviewViewControllerTest {
         return Year.now(clock).getValue();
     }
 
-    private ResultActions perform(MockHttpServletRequestBuilder builder) throws Exception {
-        return standaloneSetup(sut)
-            .setCustomArgumentResolvers(new PageableHandlerMethodArgumentResolver())
-            .build()
-            .perform(builder);
+    private MockMvcTester mockmvc() {
+        return MockMvcTester.of(List.of(sut),
+            mockMvcBuilder ->
+                mockMvcBuilder.setCustomArgumentResolvers(new PageableHandlerMethodArgumentResolver())
+                    .build()
+        );
     }
 }
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteTest.java b/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteTest.java
index fac242638..b5db69733 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteTest.java
@@ -275,9 +275,9 @@ class SickNoteTest {
 
         final Period period = sickNote.getPeriod();
         assertThat(period).isNotNull();
-        assertThat(period.getStartDate()).isEqualTo(startDate);
-        assertThat(period.getEndDate()).isEqualTo(endDate);
-        assertThat(period.getDayLength()).isEqualTo(FULL);
+        assertThat(period.startDate()).isEqualTo(startDate);
+        assertThat(period.endDate()).isEqualTo(endDate);
+        assertThat(period.dayLength()).isEqualTo(FULL);
     }
 
     @Test
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/web/FilterPeriodTest.java b/src/test/java/org/synyx/urlaubsverwaltung/web/FilterPeriodTest.java
index 3b28cb7dd..8503be983 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/web/FilterPeriodTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/web/FilterPeriodTest.java
@@ -16,8 +16,8 @@ class FilterPeriodTest {
         final LocalDate endDate = LocalDate.of(2199, MAY, 19);
 
         final FilterPeriod filterPeriod = new FilterPeriod(null, endDate);
-        assertThat(filterPeriod.getStartDate()).isNull();
-        assertThat(filterPeriod.getEndDate()).isEqualTo(endDate);
+        assertThat(filterPeriod.startDate()).isNull();
+        assertThat(filterPeriod.endDate()).isEqualTo(endDate);
     }
 
     @Test
@@ -26,8 +26,8 @@ class FilterPeriodTest {
         final LocalDate startDate = LocalDate.of(2015, MAY, 19);
 
         final FilterPeriod filterPeriod = new FilterPeriod(startDate, null);
-        assertThat(filterPeriod.getStartDate()).isEqualTo(startDate);
-        assertThat(filterPeriod.getEndDate()).isNull();
+        assertThat(filterPeriod.startDate()).isEqualTo(startDate);
+        assertThat(filterPeriod.endDate()).isNull();
     }
 
     @Test
@@ -37,8 +37,8 @@ class FilterPeriodTest {
         final LocalDate endDate = LocalDate.of(2015, DECEMBER, 21);
         final FilterPeriod period = new FilterPeriod(startDate, endDate);
 
-        assertThat(period.getStartDate()).isEqualTo(startDate);
-        assertThat(period.getEndDate()).isEqualTo(endDate);
+        assertThat(period.startDate()).isEqualTo(startDate);
+        assertThat(period.endDate()).isEqualTo(endDate);
     }
 
     @Test
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/web/FrameDataProviderTest.java b/src/test/java/org/synyx/urlaubsverwaltung/web/FrameDataProviderTest.java
index 53f73ea82..eca5ec701 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/web/FrameDataProviderTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/web/FrameDataProviderTest.java
@@ -95,7 +95,7 @@ class FrameDataProviderTest {
             .isInstanceOf(NavigationDto.class)
             .satisfies(navigation -> {
                 final NavigationDto dto = (NavigationDto) navigation;
-                assertThat(dto.getElements()).containsExactly(
+                assertThat(dto.elements()).containsExactly(
                     new NavigationItemDto("home-link", "/web/overview", "nav.home.title", "home"),
                     new NavigationItemDto("application-link", "/web/application", "nav.vacation.title", "calendar"),
                     new NavigationItemDto("overtime-link", "/web/overtime", "nav.overtime.title", "clock"),
@@ -132,7 +132,7 @@ class FrameDataProviderTest {
             .isInstanceOf(NavigationDto.class)
             .satisfies(navigation -> {
                 final NavigationDto dto = (NavigationDto) navigation;
-                assertThat(dto.getElements()).containsExactly(
+                assertThat(dto.elements()).containsExactly(
                     new NavigationItemDto("home-link", "/web/overview", "nav.home.title", "home"),
                     new NavigationItemDto("application-link", "/web/application", "nav.vacation.title", "calendar"),
                     new NavigationItemDto("overtime-link", "/web/overtime", "nav.overtime.title", "clock"),
@@ -169,7 +169,7 @@ class FrameDataProviderTest {
             .isInstanceOf(NavigationDto.class)
             .satisfies(navigation -> {
                 final NavigationDto dto = (NavigationDto) navigation;
-                assertThat(dto.getElements()).containsExactly(
+                assertThat(dto.elements()).containsExactly(
                     new NavigationItemDto("home-link", "/web/overview", "nav.home.title", "home"),
                     new NavigationItemDto("application-link", "/web/application", "nav.vacation.title", "calendar"),
                     new NavigationItemDto("overtime-link", "/web/overtime", "nav.overtime.title", "clock"),
@@ -207,7 +207,7 @@ class FrameDataProviderTest {
             .isInstanceOf(NavigationDto.class)
             .satisfies(navigation -> {
                 final NavigationDto dto = (NavigationDto) navigation;
-                assertThat(dto.getElements()).containsExactly(
+                assertThat(dto.elements()).containsExactly(
                     new NavigationItemDto("home-link", "/web/overview", "nav.home.title", "home"),
                     new NavigationItemDto("application-link", "/web/application", "nav.vacation.title", "calendar"),
                     new NavigationItemDto("overtime-link", "/web/overtime", "nav.overtime.title", "clock"),
@@ -243,7 +243,7 @@ class FrameDataProviderTest {
             .isInstanceOf(NavigationDto.class)
             .satisfies(navigation -> {
                 final NavigationDto dto = (NavigationDto) navigation;
-                assertThat(dto.getElements()).containsExactly(
+                assertThat(dto.elements()).containsExactly(
                     new NavigationItemDto("home-link", "/web/overview", "nav.home.title", "home"),
                     new NavigationItemDto("application-link", "/web/application", "nav.vacation.title", "calendar"),
                     new NavigationItemDto("overtime-link", "/web/overtime", "nav.overtime.title", "clock"),
@@ -279,7 +279,7 @@ class FrameDataProviderTest {
             .isInstanceOf(NavigationDto.class)
             .satisfies(navigation -> {
                 final NavigationDto dto = (NavigationDto) navigation;
-                assertThat(dto.getElements()).containsExactly(
+                assertThat(dto.elements()).containsExactly(
                     new NavigationItemDto("home-link", "/web/overview", "nav.home.title", "home"),
                     new NavigationItemDto("application-link", "/web/application", "nav.vacation.title", "calendar"),
                     new NavigationItemDto("overtime-link", "/web/overtime", "nav.overtime.title", "clock"),
@@ -315,7 +315,7 @@ class FrameDataProviderTest {
             .isInstanceOf(NavigationDto.class)
             .satisfies(navigation -> {
                 final NavigationDto dto = (NavigationDto) navigation;
-                assertThat(dto.getElements()).containsExactly(
+                assertThat(dto.elements()).containsExactly(
                     new NavigationItemDto("home-link", "/web/overview", "nav.home.title", "home"),
                     new NavigationItemDto("application-link", "/web/application", "nav.vacation.title", "calendar"),
                     new NavigationItemDto("overtime-link", "/web/overtime", "nav.overtime.title", "clock"),
@@ -379,7 +379,7 @@ class FrameDataProviderTest {
             .isInstanceOf(NavigationDto.class)
             .satisfies(navigation -> {
                 final NavigationDto dto = (NavigationDto) navigation;
-                assertThat(dto.getElements()).contains(
+                assertThat(dto.elements()).contains(
                     new NavigationItemDto("overtime-link", "/web/overtime", "nav.overtime.title", "clock")
                 );
             });
@@ -407,7 +407,7 @@ class FrameDataProviderTest {
             .isInstanceOf(NavigationDto.class)
             .satisfies(navigation -> {
                 final NavigationDto dto = (NavigationDto) navigation;
-                assertThat(dto.getElements())
+                assertThat(dto.elements())
                     .isNotEmpty()
                     .doesNotContain(new NavigationItemDto("overtime-link", "/web/overtime", "nav.overtime.title", "clock"));
             });
@@ -496,7 +496,7 @@ class FrameDataProviderTest {
             .isInstanceOf(NavigationDto.class)
             .satisfies(navigation -> {
                 final NavigationDto dto = (NavigationDto) navigation;
-                assertThat(dto.getElements())
+                assertThat(dto.elements())
                     .isNotEmpty()
                     .contains(new NavigationItemDto("overtime-link", "/web/overtime", "nav.overtime.title", "clock"));
             });