Repository: urlaubsverwaltung/urlaubsverwaltung
Pull request #4379 (2023-12-12 16:19:19)

Improve code - use records and new sequences collection getFirst/getLast
<!--

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 #.

-->



Patch:
diff --git a/.editorconfig b/.editorconfig
index 0474d3f2c..2115097e7 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -19,6 +19,3 @@ indent_size = 2
 
 [*.md]
 trim_trailing_whitespace = false
-
-[assets-manifest.json]
-insert_final_newline = false
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsenceServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsenceServiceImpl.java
index cb1117c7b..5baba0852 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsenceServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/absence/AbsenceServiceImpl.java
@@ -151,7 +151,7 @@ public class AbsenceServiceImpl implements AbsenceService {
         final Person person = workingTimeCalendarEntry.getKey();
         final WorkingTimeCalendar workingTimeCalendar = workingTimeCalendarEntry.getValue();
 
-        return workingTimeCalendar.getWorkingDays().entrySet().stream()
+        return workingTimeCalendar.workingDays().entrySet().stream()
             .<AbsencePeriod>mapMulti((workingDayInformationEntry, consumer) -> {
                 final LocalDate date = workingDayInformationEntry.getKey();
                 final WorkingDayInformation workingDayInformation = workingDayInformationEntry.getValue();
@@ -200,8 +200,8 @@ public class AbsenceServiceImpl implements AbsenceService {
 
     private List<AbsencePeriod.Record> days(Application application, DateRange askedDateRange, Function<Person, WorkingTimeCalendar> workingTimeCalendarSupplier) {
 
-        final LocalDate start = maxDate(application.getStartDate(), askedDateRange.getStartDate());
-        final LocalDate end = minDate(application.getEndDate(), askedDateRange.getEndDate());
+        final LocalDate start = maxDate(application.getStartDate(), askedDateRange.startDate());
+        final LocalDate end = minDate(application.getEndDate(), askedDateRange.endDate());
 
         final Person person = application.getPerson();
         final WorkingTimeCalendar workingTimeCalendar = workingTimeCalendarSupplier.apply(person);
@@ -270,8 +270,8 @@ public class AbsenceServiceImpl implements AbsenceService {
 
     private List<AbsencePeriod.Record> days(SickNote sickNote, DateRange askedDateRange, Function<Person, WorkingTimeCalendar> workingTimeCalendarSupplier) {
 
-        final LocalDate start = maxDate(sickNote.getStartDate(), askedDateRange.getStartDate());
-        final LocalDate end = minDate(sickNote.getEndDate(), askedDateRange.getEndDate());
+        final LocalDate start = maxDate(sickNote.getStartDate(), askedDateRange.startDate());
+        final LocalDate end = minDate(sickNote.getEndDate(), askedDateRange.endDate());
 
         final Person person = sickNote.getPerson();
         final WorkingTimeCalendar workingTimeCalendar = workingTimeCalendarSupplier.apply(person);
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/absence/DateRange.java b/src/main/java/org/synyx/urlaubsverwaltung/absence/DateRange.java
index d8aa06dbe..deefd893e 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/absence/DateRange.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/absence/DateRange.java
@@ -6,7 +6,6 @@ import java.time.Duration;
 import java.time.LocalDate;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
-import java.util.Objects;
 import java.util.Optional;
 import java.util.stream.Stream;
 import java.util.stream.StreamSupport;
@@ -19,28 +18,13 @@ import static java.time.temporal.ChronoUnit.DAYS;
  * A date range represents a period of time between two LocalDates.
  * Date range are inclusive of the start and the end date.
  * The end date is always greater than or equal to the start date.
- * <p>
  */
-public final class DateRange implements Iterable<LocalDate> {
-
-    private final LocalDate startDate;
-    private final LocalDate endDate;
+public record DateRange(LocalDate startDate, LocalDate endDate) implements Iterable<LocalDate> {
 
-    public DateRange(LocalDate startDate, LocalDate endDate) {
+    public DateRange {
         if (startDate != null && endDate != null) {
             Assert.isTrue(!startDate.isAfter(endDate), "The end date must be greater than or equal to the start date.");
         }
-
-        this.startDate = startDate;
-        this.endDate = endDate;
-    }
-
-    public LocalDate getStartDate() {
-        return startDate;
-    }
-
-    public LocalDate getEndDate() {
-        return endDate;
     }
 
     /**
@@ -147,7 +131,6 @@ public final class DateRange implements Iterable<LocalDate> {
         return Duration.ofDays(startDate.until(endDate, DAYS)).plusDays(1);
     }
 
-
     @Override
     public Iterator<LocalDate> iterator() {
         return new DateRangeIterator(startDate, endDate);
@@ -157,19 +140,6 @@ public final class DateRange implements Iterable<LocalDate> {
         return StreamSupport.stream(spliterator(), false);
     }
 
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        DateRange that = (DateRange) o;
-        return Objects.equals(startDate, that.startDate) && Objects.equals(endDate, that.endDate);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(startDate, endDate);
-    }
-
     private static final class DateRangeIterator implements Iterator<LocalDate> {
 
         private final LocalDate endDate;
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 28f8d5fa1..1f6056b16 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/absence/web/AbsenceOverviewViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/absence/web/AbsenceOverviewViewController.java
@@ -188,7 +188,7 @@ public class AbsenceOverviewViewController implements HasLaunchpad {
 
     private List<String> getSelectedDepartmentNames(List<String> rawSelectedDepartments, List<Department> departments) {
         final List<String> preparedSelectedDepartments = rawSelectedDepartments.stream().filter(StringUtils::hasText).collect(toList());
-        return preparedSelectedDepartments.isEmpty() ? List.of(departments.get(0).getName()) : preparedSelectedDepartments;
+        return preparedSelectedDepartments.isEmpty() ? List.of(departments.getFirst().getName()) : preparedSelectedDepartments;
     }
 
     private List<AbsenceOverviewMonthDto> getAbsenceOverViewMonthModels(DateRange dateRange,
@@ -199,7 +199,7 @@ public class AbsenceOverviewViewController implements HasLaunchpad {
 
         final LocalDate today = LocalDate.now(clock);
         final List<WorkingTime> workingTimeList = workingTimeService.getByPersons(personList);
-        final List<AbsencePeriod> openAbsences = absenceService.getOpenAbsences(personList, dateRange.getStartDate(), dateRange.getEndDate());
+        final List<AbsencePeriod> openAbsences = absenceService.getOpenAbsences(personList, dateRange.startDate(), dateRange.endDate());
 
         final HashMap<Integer, AbsenceOverviewMonthDto> monthsByNr = new HashMap<>();
 
@@ -269,9 +269,9 @@ public class AbsenceOverviewViewController implements HasLaunchpad {
     private Map<LocalDate, PublicHoliday> getPublicHolidaysOfPerson(DateRange dateRange, Person person) {
         return workingTimeService.getFederalStatesByPersonAndDateRange(person, dateRange)
             .entrySet().stream()
-            .map(entry -> publicHolidaysService.getPublicHolidays(entry.getKey().getStartDate(), entry.getKey().getEndDate(), entry.getValue()))
+            .map(entry -> publicHolidaysService.getPublicHolidays(entry.getKey().startDate(), entry.getKey().endDate(), entry.getValue()))
             .flatMap(List::stream)
-            .collect(toMap(PublicHoliday::getDate, Function.identity(), (publicHoliday, publicHoliday2) -> new PublicHoliday(publicHoliday.getDate(),publicHoliday.getDayLength(), publicHoliday.getDescription().concat("/").concat(publicHoliday2.getDescription()))));
+            .collect(toMap(PublicHoliday::date, Function.identity(), (publicHoliday, publicHoliday2) -> new PublicHoliday(publicHoliday.date(),publicHoliday.dayLength(), publicHoliday.description().concat("/").concat(publicHoliday2.description()))));
 
     }
 
@@ -300,13 +300,13 @@ public class AbsenceOverviewViewController implements HasLaunchpad {
                                                                      Function<AbsencePeriod.RecordInfo, VacationTypeColor> recordInfoToColor) {
 
         AbsenceOverviewDayType.Builder builder = getAbsenceOverviewDayType(absenceRecords, shouldAnonymizeAbsenceType, recordInfoToColor);
-        if (publicHoliday.getDayLength().isMorning()) {
+        if (publicHoliday.dayLength().isMorning()) {
             builder = builder.publicHolidayMorning();
         }
-        if (publicHoliday.getDayLength().isNoon()) {
+        if (publicHoliday.dayLength().isNoon()) {
             builder = builder.publicHolidayNoon();
         }
-        if (publicHoliday.getDayLength().isFull()) {
+        if (publicHoliday.dayLength().isFull()) {
             builder = builder.publicHolidayFull();
         }
         return builder;
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/account/AccountDraft.java b/src/main/java/org/synyx/urlaubsverwaltung/account/AccountDraft.java
index ac0b86e50..4a522bd04 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/account/AccountDraft.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/account/AccountDraft.java
@@ -12,7 +12,7 @@ import static java.time.temporal.TemporalAdjusters.lastDayOfYear;
  * A not yet existent {@link Account} containing information taken from the previous year.
  * Can be used to manually create a new {@link Account} for instance.
  */
-final class AccountDraft {
+public final class AccountDraft {
 
     private final Person person;
     private final Year year;
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/account/AccountViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/account/AccountViewController.java
index 5ca527a36..4d3fdea18 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/account/AccountViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/account/AccountViewController.java
@@ -47,7 +47,10 @@ public class AccountViewController implements HasLaunchpad {
     private final Clock clock;
 
     @Autowired
-    public AccountViewController(PersonService personService, AccountService accountService, AccountInteractionService accountInteractionService, VacationTypeViewModelService vacationTypeViewModelService, AccountFormValidator validator, Clock clock) {
+    AccountViewController(PersonService personService, AccountService accountService,
+                          AccountInteractionService accountInteractionService,
+                          VacationTypeViewModelService vacationTypeViewModelService,
+                          AccountFormValidator validator, Clock clock) {
         this.personService = personService;
         this.accountService = accountService;
         this.accountInteractionService = accountInteractionService;
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/account/HolidayAccountVacationDays.java b/src/main/java/org/synyx/urlaubsverwaltung/account/HolidayAccountVacationDays.java
index f2ee82149..547ed5462 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/account/HolidayAccountVacationDays.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/account/HolidayAccountVacationDays.java
@@ -2,29 +2,8 @@ package org.synyx.urlaubsverwaltung.account;
 
 import java.util.Objects;
 
-public class HolidayAccountVacationDays {
-
-    private final Account account;
-    private final VacationDaysLeft vacationDaysYear;
-    private final VacationDaysLeft vacationDaysDateRange;
-
-    public HolidayAccountVacationDays(Account account, VacationDaysLeft vacationDaysYear, VacationDaysLeft vacationDaysDateRange) {
-        this.account = account;
-        this.vacationDaysYear = vacationDaysYear;
-        this.vacationDaysDateRange = vacationDaysDateRange;
-    }
-
-    public Account getAccount() {
-        return account;
-    }
-
-    public VacationDaysLeft getVacationDaysYear() {
-        return vacationDaysYear;
-    }
-
-    public VacationDaysLeft getVacationDaysDateRange() {
-        return vacationDaysDateRange;
-    }
+public record HolidayAccountVacationDays(Account account, VacationDaysLeft vacationDaysYear,
+                                         VacationDaysLeft vacationDaysDateRange) {
 
     @Override
     public boolean equals(Object o) {
@@ -38,13 +17,4 @@ public class HolidayAccountVacationDays {
     public int hashCode() {
         return Objects.hash(account);
     }
-
-    @Override
-    public String toString() {
-        return "HolidayAccountVacationDays{" +
-            "account=" + account +
-            ", vacationDaysYear=" + vacationDaysYear +
-            ", vacationDaysDateRange=" + vacationDaysDateRange +
-            '}';
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/account/VacationDaysService.java b/src/main/java/org/synyx/urlaubsverwaltung/account/VacationDaysService.java
index 5877bf9ba..1ce931615 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/account/VacationDaysService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/account/VacationDaysService.java
@@ -103,8 +103,8 @@ public class VacationDaysService {
                                                                         Map<Person, WorkingTimeCalendar> workingTimeCalendarsByPerson,
                                                                         DateRange dateRange) {
 
-        final LocalDate from = dateRange.getStartDate();
-        final LocalDate to = dateRange.getEndDate();
+        final LocalDate from = dateRange.startDate();
+        final LocalDate to = dateRange.endDate();
 
         if (to.getYear() != from.getYear()) {
             throw new IllegalArgumentException(String.format("date range must be in the same year but was from=%s to=%s", from, to));
@@ -144,7 +144,7 @@ public class VacationDaysService {
 
                 return new HolidayAccountVacationDays(account, vacationDaysLeftYear, vacationDaysLeftDateRange);
             })
-            .collect(toMap(HolidayAccountVacationDays::getAccount, identity()));
+            .collect(toMap(HolidayAccountVacationDays::account, identity()));
     }
 
     BigDecimal getUsedVacationDaysBetweenTwoMilestones(Person person, LocalDate firstMilestone, LocalDate lastMilestone) {
@@ -161,8 +161,8 @@ public class VacationDaysService {
 
     private Map<Account, UsedVacationDaysTuple> getUsedVacationDays(List<Account> holidayAccounts, DateRange dateRange, Map<Person, WorkingTimeCalendar> workingTimeCalendarsByPerson) {
 
-        final LocalDate firstDayOfYear = dateRange.getStartDate().with(firstDayOfYear());
-        final LocalDate lastDayOfYear = dateRange.getEndDate().with(lastDayOfYear());
+        final LocalDate firstDayOfYear = dateRange.startDate().with(firstDayOfYear());
+        final LocalDate lastDayOfYear = dateRange.endDate().with(lastDayOfYear());
 
         final List<Person> persons = holidayAccounts.stream().map(Account::getPerson).distinct().collect(toList());
         final List<ApplicationStatus> status = List.of(WAITING, TEMPORARY_ALLOWED, ALLOWED, ALLOWED_CANCELLATION_REQUESTED);
@@ -213,8 +213,8 @@ public class VacationDaysService {
         final LocalDate applicationStartOrFirstDayOfYear = max(application.getStartDate(), holidayAccountValidFrom.with(firstDayOfYear()));
         final LocalDate applicationEndOrLastDayOfYear = min(application.getEndDate(), holidayAccountValidFrom.with(lastDayOfYear()));
 
-        final LocalDate applicationStartOrFirstDayOfYearOrFrom = max(applicationStartOrFirstDayOfYear, dateRange.getStartDate());
-        final LocalDate applicationEndOrLastDayOfYearOrTo = min(applicationEndOrLastDayOfYear, dateRange.getEndDate());
+        final LocalDate applicationStartOrFirstDayOfYearOrFrom = max(applicationStartOrFirstDayOfYear, dateRange.startDate());
+        final LocalDate applicationEndOrLastDayOfYearOrTo = min(applicationEndOrLastDayOfYear, dateRange.endDate());
 
         // use vacation days scoped to from/to date range
         final BigDecimal dateRangeWorkDaysCountBeforeExpiryDate;
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/Application.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/Application.java
index 59a0e6175..dfb735de3 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/Application.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/Application.java
@@ -350,7 +350,7 @@ public class Application {
 
     public Map<Integer, Duration> getHoursByYear() {
         return this.splitByYear().stream().collect(Collectors.toMap(
-            dateRangeForYear -> dateRangeForYear.getStartDate().getYear(),
+            dateRangeForYear -> dateRangeForYear.startDate().getYear(),
             this::getHoursForDateRange));
     }
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAllowedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAllowedEvent.java
index 2dc9af990..3f960f1e6 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAllowedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAllowedEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.application.application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class ApplicationAllowedEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final Application application;
-
-    public ApplicationAllowedEvent(UUID id, Instant createdAt, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.application = application;
-    }
+public record ApplicationAllowedEvent(UUID id, Instant createdAt, Application application) {
 
     public static ApplicationAllowedEvent of(Application application) {
         return new ApplicationAllowedEvent(UUID.randomUUID(), Instant.now(), application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAllowedTemporarilyEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAllowedTemporarilyEvent.java
index ac569bf05..9e246eba1 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAllowedTemporarilyEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAllowedTemporarilyEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.application.application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class ApplicationAllowedTemporarilyEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final Application application;
-
-    public ApplicationAllowedTemporarilyEvent(UUID id, Instant createdAt, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.application = application;
-    }
+public record ApplicationAllowedTemporarilyEvent(UUID id, Instant createdAt, Application application) {
 
     public static ApplicationAllowedTemporarilyEvent of(Application application) {
         return new ApplicationAllowedTemporarilyEvent(UUID.randomUUID(), Instant.now(), application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAppliedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAppliedEvent.java
index bc6829e60..d594637f7 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAppliedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationAppliedEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.application.application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class ApplicationAppliedEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final Application application;
-
-    public ApplicationAppliedEvent(UUID id, Instant createdAt, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.application = application;
-    }
+public record ApplicationAppliedEvent(UUID id, Instant createdAt, Application application) {
 
     public static ApplicationAppliedEvent of(Application application) {
         return new ApplicationAppliedEvent(UUID.randomUUID(), Instant.now(), application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCancellationRequestedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCancellationRequestedEvent.java
index f73cf39dd..88c476872 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCancellationRequestedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCancellationRequestedEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.application.application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class ApplicationCancellationRequestedEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final Application application;
-
-    public ApplicationCancellationRequestedEvent(UUID id, Instant createdAt, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.application = application;
-    }
+public record ApplicationCancellationRequestedEvent(UUID id, Instant createdAt, Application application) {
 
     public static ApplicationCancellationRequestedEvent of(Application application) {
         return new ApplicationCancellationRequestedEvent(UUID.randomUUID(), Instant.now(), application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCancelledEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCancelledEvent.java
index 9e13c582c..00e19cbe1 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCancelledEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCancelledEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.application.application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class ApplicationCancelledEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final Application application;
-
-    public ApplicationCancelledEvent(UUID id, Instant createdAt, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.application = application;
-    }
+public record ApplicationCancelledEvent(UUID id, Instant createdAt, Application application) {
 
     public static ApplicationCancelledEvent of(Application application) {
         return new ApplicationCancelledEvent(UUID.randomUUID(), Instant.now(), application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCreatedFromSickNoteEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCreatedFromSickNoteEvent.java
index 806b2e6e2..d0f0c16d7 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCreatedFromSickNoteEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationCreatedFromSickNoteEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.application.application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class ApplicationCreatedFromSickNoteEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final Application application;
-
-    public ApplicationCreatedFromSickNoteEvent(UUID id, Instant createdAt, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.application = application;
-    }
+public record ApplicationCreatedFromSickNoteEvent(UUID id, Instant createdAt, Application application) {
 
     public static ApplicationCreatedFromSickNoteEvent of(Application application) {
         return new ApplicationCreatedFromSickNoteEvent(UUID.randomUUID(), Instant.now(), application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationDeclinedCancellationRequestEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationDeclinedCancellationRequestEvent.java
index 9846c2f45..10ba4b2de 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationDeclinedCancellationRequestEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationDeclinedCancellationRequestEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.application.application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class ApplicationDeclinedCancellationRequestEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final Application application;
-
-    public ApplicationDeclinedCancellationRequestEvent(UUID id, Instant createdAt, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.application = application;
-    }
+public record ApplicationDeclinedCancellationRequestEvent(UUID id, Instant createdAt, Application application) {
 
     public static ApplicationDeclinedCancellationRequestEvent of(Application application) {
         return new ApplicationDeclinedCancellationRequestEvent(UUID.randomUUID(), Instant.now(), application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationDeletedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationDeletedEvent.java
index aa549bd17..5bc93a138 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationDeletedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationDeletedEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.application.application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class ApplicationDeletedEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final Application application;
-
-    public ApplicationDeletedEvent(UUID id, Instant createdAt, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.application = application;
-    }
+public record ApplicationDeletedEvent(UUID id, Instant createdAt, Application application) {
 
     public static ApplicationDeletedEvent of(Application application) {
         return new ApplicationDeletedEvent(UUID.randomUUID(), Instant.now(), application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveDetailsViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveDetailsViewController.java
index f18994451..636b2f887 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveDetailsViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationForLeaveDetailsViewController.java
@@ -402,7 +402,7 @@ class ApplicationForLeaveDetailsViewController implements HasLaunchpad {
         final List<ApplicationComment> comments = commentService.getCommentsByApplication(application);
         model.addAttribute("comment", new ApplicationCommentForm());
         model.addAttribute("comments", comments);
-        model.addAttribute("lastComment", comments.get(comments.size() - 1));
+        model.addAttribute("lastComment", comments.getLast());
 
         // APPLICATION FOR LEAVE
         final ApplicationForLeave applicationForLeave = new ApplicationForLeave(application, workDaysCountService);
@@ -410,7 +410,7 @@ class ApplicationForLeaveDetailsViewController implements HasLaunchpad {
 
         final Map<DateRange, WorkingTime> workingTime = workingTimeService.getWorkingTimesByPersonAndDateRange(
                 application.getPerson(), new DateRange(application.getStartDate(), application.getEndDate())).entrySet().stream()
-            .sorted(Map.Entry.comparingByKey(comparing(DateRange::getStartDate)))
+            .sorted(Map.Entry.comparingByKey(comparing(DateRange::startDate)))
             .collect(toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> newValue, LinkedHashMap::new));
         model.addAttribute("dateRangeWorkingTimes", workingTime);
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationInteractionServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationInteractionServiceImpl.java
index 6150a2016..8d55b38a8 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationInteractionServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationInteractionServiceImpl.java
@@ -554,7 +554,7 @@ class ApplicationInteractionServiceImpl implements ApplicationInteractionService
      */
     @EventListener
     void deleteAllByPerson(PersonDeletedEvent event) {
-        final Person personToBeDeleted = event.getPerson();
+        final Person personToBeDeleted = event.person();
         commentService.deleteByApplicationPerson(personToBeDeleted);
         commentService.deleteCommentAuthor(personToBeDeleted);
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationRejectedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationRejectedEvent.java
index 88c31a24a..aae4c114c 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationRejectedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationRejectedEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.application.application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class ApplicationRejectedEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final Application application;
-
-    public ApplicationRejectedEvent(UUID id, Instant createdAt, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.application = application;
-    }
+public record ApplicationRejectedEvent(UUID id, Instant createdAt, Application application) {
 
     public static ApplicationRejectedEvent of(Application application) {
         return new ApplicationRejectedEvent(UUID.randomUUID(), Instant.now(), application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationRevokedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationRevokedEvent.java
index 3ea5015e0..5b0af7efc 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationRevokedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationRevokedEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.application.application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class ApplicationRevokedEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final Application application;
-
-    public ApplicationRevokedEvent(UUID id, Instant createdAt, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.application = application;
-    }
+public record ApplicationRevokedEvent(UUID id, Instant createdAt, Application application) {
 
     public static ApplicationRevokedEvent of(Application application) {
         return new ApplicationRevokedEvent(UUID.randomUUID(), Instant.now(), application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationServiceImpl.java
index e15e4d712..db861baa2 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationServiceImpl.java
@@ -191,8 +191,8 @@ class ApplicationServiceImpl implements ApplicationService {
      */
     @EventListener
     void deleteHolidayReplacements(PersonDeletedEvent event) {
-        final List<ApplicationEntity> applicationsWithReplacedApplicationReplacements = applicationRepository.findAllByHolidayReplacements_Person(event.getPerson()).stream()
-            .map(deleteHolidayReplacement(event.getPerson()))
+        final List<ApplicationEntity> applicationsWithReplacedApplicationReplacements = applicationRepository.findAllByHolidayReplacements_Person(event.person()).stream()
+            .map(deleteHolidayReplacement(event.person()))
             .collect(toList());
         applicationRepository.saveAll(applicationsWithReplacedApplicationReplacements);
     }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationUpdatedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationUpdatedEvent.java
index 18cd83a66..46b95bea8 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationUpdatedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/ApplicationUpdatedEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.application.application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class ApplicationUpdatedEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final Application application;
-
-    public ApplicationUpdatedEvent(UUID id, Instant createdAt, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.application = application;
-    }
+public record ApplicationUpdatedEvent(UUID id, Instant createdAt, Application application) {
 
     public static ApplicationUpdatedEvent of(Application application) {
         return new ApplicationUpdatedEvent(UUID.randomUUID(), Instant.now(), application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/application/CalculationService.java b/src/main/java/org/synyx/urlaubsverwaltung/application/application/CalculationService.java
index bc5c2eb27..425672b87 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/application/CalculationService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/application/CalculationService.java
@@ -164,8 +164,8 @@ class CalculationService {
     }
 
     private BigDecimal calculateWorkDaysBeforeExpiryDate(Application application, List<DateRange> beforeExpiryDate) {
-        final LocalDate start = beforeExpiryDate.get(0).getStartDate();
-        final LocalDate end = beforeExpiryDate.get(0).getEndDate();
+        final LocalDate start = beforeExpiryDate.getFirst().startDate();
+        final LocalDate end = beforeExpiryDate.getFirst().endDate();
 
         return workDaysCountService.getWorkDaysCount(
             application.getDayLength(),
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 f59069466..7e5872f71 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveExportViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/export/ApplicationForLeaveExportViewController.java
@@ -88,9 +88,9 @@ class ApplicationForLeaveExportViewController implements HasLaunchpad {
 
         final HttpHeaders headers = new HttpHeaders();
         headers.setContentType(new MediaType("text", "csv", UTF_8));
-        headers.setContentDisposition(ContentDisposition.builder("attachment").filename(csvFile.getFileName(), UTF_8).build());
+        headers.setContentDisposition(ContentDisposition.builder("attachment").filename(csvFile.fileName(), UTF_8).build());
 
-        return ResponseEntity.status(OK).headers(headers).body(csvFile.getResource());
+        return ResponseEntity.status(OK).headers(headers).body(csvFile.resource());
     }
 
     private FilterPeriod toFilterPeriod(String startDateString, String endDateString, Locale locale) {
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 868180171..47f90f5a3 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsBuilder.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsBuilder.java
@@ -83,11 +83,11 @@ class ApplicationForLeaveStatisticsBuilder {
                 if (holidayAccountVacationDaysByAccount.containsKey(account)) {
                     final HolidayAccountVacationDays holidayAccountVacationDays = holidayAccountVacationDaysByAccount.get(account);
 
-                    final VacationDaysLeft vacationDaysLeftYear = holidayAccountVacationDays.getVacationDaysYear();
+                    final VacationDaysLeft vacationDaysLeftYear = holidayAccountVacationDays.vacationDaysYear();
                     statistics.setLeftVacationDaysForYear(vacationDaysLeftYear.getLeftVacationDays(today, account.doRemainingVacationDaysExpire(), account.getExpiryDate()));
                     statistics.setLeftRemainingVacationDaysForYear(vacationDaysLeftYear.getRemainingVacationDaysLeft(today, account.doRemainingVacationDaysExpire(), account.getExpiryDate()));
 
-                    final VacationDaysLeft vacationDaysLeftPeriod = holidayAccountVacationDays.getVacationDaysDateRange();
+                    final VacationDaysLeft vacationDaysLeftPeriod = holidayAccountVacationDays.vacationDaysDateRange();
                     statistics.setLeftVacationDaysForPeriod(vacationDaysLeftPeriod.getLeftVacationDays(to, account.doRemainingVacationDaysExpire(), account.getExpiryDate()));
                     statistics.setLeftRemainingVacationDaysForPeriod(vacationDaysLeftPeriod.getRemainingVacationDaysLeft(to, account.doRemainingVacationDaysExpire(), account.getExpiryDate()));
                 }
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 69ca14671..69e88eec6 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/statistics/ApplicationForLeaveStatisticsViewController.java
@@ -178,9 +178,9 @@ class ApplicationForLeaveStatisticsViewController implements HasLaunchpad {
 
         final HttpHeaders headers = new HttpHeaders();
         headers.setContentType(new MediaType("text", "csv", UTF_8));
-        headers.setContentDisposition(ContentDisposition.builder("attachment").filename(csvFile.getFileName(), UTF_8).build());
+        headers.setContentDisposition(ContentDisposition.builder("attachment").filename(csvFile.fileName(), UTF_8).build());
 
-        return ResponseEntity.status(OK).headers(headers).body(csvFile.getResource());
+        return ResponseEntity.status(OK).headers(headers).body(csvFile.resource());
     }
 
     private FilterPeriod toFilterPeriod(String startDateString, String endDateString, Locale locale) {
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/application/vacationtype/VacationTypeLabelJpaConverter.java b/src/main/java/org/synyx/urlaubsverwaltung/application/vacationtype/VacationTypeLabelJpaConverter.java
index db08f7e7e..3e328577e 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/application/vacationtype/VacationTypeLabelJpaConverter.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/application/vacationtype/VacationTypeLabelJpaConverter.java
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import jakarta.persistence.AttributeConverter;
+import jakarta.persistence.Converter;
 import org.slf4j.Logger;
 
 import java.io.IOException;
@@ -13,6 +14,7 @@ import java.util.Map;
 import static java.lang.invoke.MethodHandles.lookup;
 import static org.slf4j.LoggerFactory.getLogger;
 
+@Converter
 final class VacationTypeLabelJpaConverter implements AttributeConverter<Map<Locale, String>, String> {
 
     private final TypeReference<Map<Locale, String>> typeReference = new TypeReference<>() {};
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarAccessibleService.java b/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarAccessibleService.java
index 3d347d5ac..efd643390 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarAccessibleService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarAccessibleService.java
@@ -27,7 +27,7 @@ class CalendarAccessibleService {
             return false;
         }
 
-        return companyCalendarAccessibleList.get(0).isAccessible();
+        return companyCalendarAccessibleList.getFirst().isAccessible();
     }
 
     void enableCompanyCalendar() {
@@ -47,7 +47,7 @@ class CalendarAccessibleService {
         if (companyCalendarAccessibleList.isEmpty()) {
             companyCalendarAccessible = new CompanyCalendarAccessible();
         } else {
-            companyCalendarAccessible = companyCalendarAccessibleList.get(0);
+            companyCalendarAccessible = companyCalendarAccessibleList.getFirst();
         }
         companyCalendarAccessible.setAccessible(isCompanyCalendarAccessible);
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarSharingViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarSharingViewController.java
index 7f2a33e6f..2a08c44e3 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarSharingViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/calendar/CalendarSharingViewController.java
@@ -44,9 +44,14 @@ public class CalendarSharingViewController implements HasLaunchpad {
     private final CalendarAccessibleService calendarAccessibleService;
 
     @Autowired
-    public CalendarSharingViewController(PersonCalendarService personCalendarService, DepartmentCalendarService departmentCalendarService,
-                                         CompanyCalendarService companyCalendarService, PersonService personService, DepartmentService departmentService,
-                                         CalendarAccessibleService calendarAccessibleService) {
+    CalendarSharingViewController(
+        PersonCalendarService personCalendarService,
+        DepartmentCalendarService departmentCalendarService,
+        CompanyCalendarService companyCalendarService,
+        PersonService personService,
+        DepartmentService departmentService,
+        CalendarAccessibleService calendarAccessibleService
+    ) {
         this.personCalendarService = personCalendarService;
         this.departmentCalendarService = departmentCalendarService;
         this.companyCalendarService = companyCalendarService;
@@ -253,7 +258,7 @@ public class CalendarSharingViewController implements HasLaunchpad {
         }
 
         if (!departmentCalendarDtos.isEmpty() && departmentCalendarDtos.stream().noneMatch(DepartmentCalendarDto::isActive)) {
-            departmentCalendarDtos.get(0).setActive(true);
+            departmentCalendarDtos.getFirst().setActive(true);
         }
 
         return departmentCalendarDtos;
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/calendar/CompanyCalendarService.java b/src/main/java/org/synyx/urlaubsverwaltung/calendar/CompanyCalendarService.java
index 54cac004f..bbc94835b 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/calendar/CompanyCalendarService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/calendar/CompanyCalendarService.java
@@ -95,7 +95,7 @@ class CompanyCalendarService {
     @EventListener
     void deleteCalendarForPerson(PersonDeletedEvent event) {
 
-        companyCalendarRepository.deleteByPerson(event.getPerson());
+        companyCalendarRepository.deleteByPerson(event.person());
     }
 
     /**
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/calendar/DepartmentCalendarService.java b/src/main/java/org/synyx/urlaubsverwaltung/calendar/DepartmentCalendarService.java
index 89993dc94..0462aa333 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/calendar/DepartmentCalendarService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/calendar/DepartmentCalendarService.java
@@ -120,7 +120,7 @@ class DepartmentCalendarService {
     @EventListener
     void deleteCalendarForPerson(PersonDeletedEvent event) {
 
-        departmentCalendarRepository.deleteByPerson(event.getPerson());
+        departmentCalendarRepository.deleteByPerson(event.person());
     }
 
     private Department getDepartmentOrThrow(Long departmentId) {
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/calendar/ICalViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/calendar/ICalViewController.java
index e0955fc73..a20a8e356 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/calendar/ICalViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/calendar/ICalViewController.java
@@ -27,9 +27,11 @@ public class ICalViewController {
     private final CompanyCalendarService companyCalendarService;
 
     @Autowired
-    public ICalViewController(PersonCalendarService personCalendarService, DepartmentCalendarService departmentCalendarService,
-                              CompanyCalendarService companyCalendarService) {
-
+    ICalViewController(
+        PersonCalendarService personCalendarService,
+        DepartmentCalendarService departmentCalendarService,
+        CompanyCalendarService companyCalendarService
+    ) {
         this.personCalendarService = personCalendarService;
         this.departmentCalendarService = departmentCalendarService;
         this.companyCalendarService = companyCalendarService;
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/calendar/PersonCalendarService.java b/src/main/java/org/synyx/urlaubsverwaltung/calendar/PersonCalendarService.java
index 5ec933713..d4d8606b8 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/calendar/PersonCalendarService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/calendar/PersonCalendarService.java
@@ -99,7 +99,7 @@ class PersonCalendarService {
     @EventListener
     void deletePersonalCalendar(PersonDeletedEvent event) {
 
-        personCalendarRepository.deleteByPerson(event.getPerson());
+        personCalendarRepository.deleteByPerson(event.person());
     }
 
     private Person getPersonOrThrow(Long personId) {
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/csv/CSVFile.java b/src/main/java/org/synyx/urlaubsverwaltung/csv/CSVFile.java
index ab24001a1..af81bea65 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/csv/CSVFile.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/csv/CSVFile.java
@@ -2,21 +2,5 @@ package org.synyx.urlaubsverwaltung.csv;
 
 import org.springframework.core.io.ByteArrayResource;
 
-public class CSVFile {
-
-    private final String fileName;
-    private final ByteArrayResource resource;
-
-    public CSVFile(String fileName, ByteArrayResource resource) {
-        this.fileName = fileName;
-        this.resource = resource;
-    }
-
-    public String getFileName() {
-        return fileName;
-    }
-
-    public ByteArrayResource getResource() {
-        return resource;
-    }
+public record CSVFile(String fileName, ByteArrayResource resource) {
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/department/DepartmentServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/department/DepartmentServiceImpl.java
index ea6a7eb63..f6027a616 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/department/DepartmentServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/department/DepartmentServiceImpl.java
@@ -215,9 +215,9 @@ class DepartmentServiceImpl implements DepartmentService {
     @EventListener
     void deleteAssignedDepartmentsOfMember(PersonDeletedEvent event) {
 
-        getAssignedDepartmentsOfMember(event.getPerson()).forEach(department -> {
+        getAssignedDepartmentsOfMember(event.person()).forEach(department -> {
             department.setMembers(department.getMembers().stream()
-                .filter(not(isEqual(event.getPerson())))
+                .filter(not(isEqual(event.person())))
                 .collect(toList()));
             update(department);
         });
@@ -231,9 +231,9 @@ class DepartmentServiceImpl implements DepartmentService {
     @EventListener
     void deleteDepartmentHead(PersonDeletedEvent event) {
 
-        getManagedDepartmentsOfDepartmentHead(event.getPerson()).forEach(department -> {
+        getManagedDepartmentsOfDepartmentHead(event.person()).forEach(department -> {
             department.setDepartmentHeads(department.getDepartmentHeads().stream()
-                .filter(person -> !person.equals(event.getPerson()))
+                .filter(person -> !person.equals(event.person()))
                 .collect(toList()));
             update(department);
         });
@@ -248,9 +248,9 @@ class DepartmentServiceImpl implements DepartmentService {
     @EventListener
     void deleteSecondStageAuthority(PersonDeletedEvent event) {
 
-        getManagedDepartmentsOfSecondStageAuthority(event.getPerson()).forEach(department -> {
+        getManagedDepartmentsOfSecondStageAuthority(event.person()).forEach(department -> {
             department.setSecondStageAuthorities(department.getSecondStageAuthorities().stream()
-                .filter(person -> !person.equals(event.getPerson()))
+                .filter(person -> !person.equals(event.person()))
                 .collect(toList()));
             update(department);
         });
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 a66d2536c..a3b27431b 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/extension/application/ApplicationEventHandlerExtension.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/extension/application/ApplicationEventHandlerExtension.java
@@ -88,25 +88,25 @@ public class ApplicationEventHandlerExtension {
 
     private static Function<AbsencePeriod, Optional<ApplicationCreatedFromSickNoteEventDTO>> toApplicationCreatedFromSickNoteEventDTO(String tenantId, ApplicationCreatedFromSickNoteEvent event) {
         return absencePeriod ->
-            toVacationType(event.getApplication().getVacationType()).map(vacationType -> {
-                final ApplicationPersonDTO person = toApplicationPersonDTO(event.getApplication().getPerson());
-                final ApplicationPersonDTO appliedBy = event.getApplication().getApplier() != null ? toApplicationPersonDTO(event.getApplication().getApplier()) : null;
-                final ApplicationPeriodDTO period = toPeriod(event.getApplication());
-                final String status = toStatus(event.getApplication());
+            toVacationType(event.application().getVacationType()).map(vacationType -> {
+                final ApplicationPersonDTO person = toApplicationPersonDTO(event.application().getPerson());
+                final ApplicationPersonDTO appliedBy = event.application().getApplier() != null ? toApplicationPersonDTO(event.application().getApplier()) : null;
+                final ApplicationPeriodDTO period = toPeriod(event.application());
+                final String status = toStatus(event.application());
                 final Set<LocalDate> absentWorkingDays = toAbsentWorkingDays(absencePeriod);
 
                 return ApplicationCreatedFromSickNoteEventDTO.builder()
-                    .id(event.getId())
-                    .sourceId(event.getApplication().getId())
-                    .createdAt(event.getCreatedAt())
+                    .id(event.id())
+                    .sourceId(event.application().getId())
+                    .createdAt(event.createdAt())
                     .tenantId(tenantId)
                     .person(person)
                     .appliedBy(appliedBy)
                     .period(period)
                     .vacationType(vacationType)
-                    .reason(event.getApplication().getReason())
+                    .reason(event.application().getReason())
                     .status(status)
-                    .teamInformed(event.getApplication().isTeamInformed())
+                    .teamInformed(event.application().isTeamInformed())
                     .absentWorkingDays(absentWorkingDays)
                     .build();
             });
@@ -114,28 +114,28 @@ public class ApplicationEventHandlerExtension {
 
     private static Function<AbsencePeriod, Optional<ApplicationAllowedEventDTO>> toApplicationAllowedEventDTO(String tenantId, ApplicationAllowedEvent event) {
         return absencePeriod ->
-            toVacationType(event.getApplication().getVacationType()).map(vacationType -> {
-                final ApplicationPersonDTO person = toApplicationPersonDTO(event.getApplication().getPerson());
-                final ApplicationPersonDTO appliedBy = event.getApplication().getApplier() != null ? toApplicationPersonDTO(event.getApplication().getApplier()) : null;
-                final ApplicationPersonDTO allowedBy = event.getApplication().getBoss() != null ? toApplicationPersonDTO(event.getApplication().getBoss()) : null;
-                final ApplicationPeriodDTO period = toPeriod(event.getApplication());
-                final String status = toStatus(event.getApplication());
+            toVacationType(event.application().getVacationType()).map(vacationType -> {
+                final ApplicationPersonDTO person = toApplicationPersonDTO(event.application().getPerson());
+                final ApplicationPersonDTO appliedBy = event.application().getApplier() != null ? toApplicationPersonDTO(event.application().getApplier()) : null;
+                final ApplicationPersonDTO allowedBy = event.application().getBoss() != null ? toApplicationPersonDTO(event.application().getBoss()) : null;
+                final ApplicationPeriodDTO period = toPeriod(event.application());
+                final String status = toStatus(event.application());
                 final Set<LocalDate> absentWorkingDays = toAbsentWorkingDays(absencePeriod);
 
                 return ApplicationAllowedEventDTO.builder()
-                    .id(event.getId())
-                    .sourceId(event.getApplication().getId())
-                    .createdAt(event.getCreatedAt())
+                    .id(event.id())
+                    .sourceId(event.application().getId())
+                    .createdAt(event.createdAt())
                     .tenantId(tenantId)
                     .person(person)
                     .appliedBy(appliedBy)
                     .allowedBy(allowedBy)
-                    .twoStageApproval(event.getApplication().isTwoStageApproval())
+                    .twoStageApproval(event.application().isTwoStageApproval())
                     .period(period)
                     .vacationType(vacationType)
-                    .reason(event.getApplication().getReason())
+                    .reason(event.application().getReason())
                     .status(status)
-                    .teamInformed(event.getApplication().isTeamInformed())
+                    .teamInformed(event.application().isTeamInformed())
                     .absentWorkingDays(absentWorkingDays)
                     .build();
             });
@@ -143,28 +143,28 @@ public class ApplicationEventHandlerExtension {
 
     private static Function<AbsencePeriod, Optional<ApplicationCancelledEventDTO>> toApplicationCancelledEventDTO(String tenantId, ApplicationCancelledEvent event) {
         return absencePeriod ->
-            toVacationType(event.getApplication().getVacationType()).map(vacationType -> {
-                final ApplicationPersonDTO person = toApplicationPersonDTO(event.getApplication().getPerson());
-                final ApplicationPersonDTO appliedBy = event.getApplication().getApplier() != null ? toApplicationPersonDTO(event.getApplication().getApplier()) : null;
-                final ApplicationPersonDTO cancelledBy = event.getApplication().getCanceller() != null ? toApplicationPersonDTO(event.getApplication().getCanceller()) : null;
-                final ApplicationPeriodDTO period = toPeriod(event.getApplication());
-                final String status = toStatus(event.getApplication());
+            toVacationType(event.application().getVacationType()).map(vacationType -> {
+                final ApplicationPersonDTO person = toApplicationPersonDTO(event.application().getPerson());
+                final ApplicationPersonDTO appliedBy = event.application().getApplier() != null ? toApplicationPersonDTO(event.application().getApplier()) : null;
+                final ApplicationPersonDTO cancelledBy = event.application().getCanceller() != null ? toApplicationPersonDTO(event.application().getCanceller()) : null;
+                final ApplicationPeriodDTO period = toPeriod(event.application());
+                final String status = toStatus(event.application());
                 final Set<LocalDate> absentWorkingDays = toAbsentWorkingDays(absencePeriod);
 
                 return ApplicationCancelledEventDTO.builder()
-                    .id(event.getId())
-                    .sourceId(event.getApplication().getId())
-                    .createdAt(event.getCreatedAt())
+                    .id(event.id())
+                    .sourceId(event.application().getId())
+                    .createdAt(event.createdAt())
                     .tenantId(tenantId)
                     .person(person)
                     .appliedBy(appliedBy)
                     .cancelledBy(cancelledBy)
-                    .twoStageApproval(event.getApplication().isTwoStageApproval())
+                    .twoStageApproval(event.application().isTwoStageApproval())
                     .period(period)
                     .vacationType(vacationType)
-                    .reason(event.getApplication().getReason())
+                    .reason(event.application().getReason())
                     .status(status)
-                    .teamInformed(event.getApplication().isTeamInformed())
+                    .teamInformed(event.application().isTeamInformed())
                     .absentWorkingDays(absentWorkingDays)
                     .build();
             });
@@ -196,7 +196,7 @@ public class ApplicationEventHandlerExtension {
     @EventListener
     @Async
     void on(ApplicationAllowedEvent event) {
-        getAbsencePeriods(event.getApplication())
+        getAbsencePeriods(event.application())
             .map(toApplicationAllowedEventDTO(tenantSupplier.get(), event))
             .ifPresent(applicationEventPublisher::publishEvent);
     }
@@ -204,7 +204,7 @@ public class ApplicationEventHandlerExtension {
     @EventListener
     @Async
     void on(ApplicationCancelledEvent event) {
-        getClosedAbsencePeriods(event.getApplication())
+        getClosedAbsencePeriods(event.application())
             .map(toApplicationCancelledEventDTO(tenantSupplier.get(), event))
             .ifPresent(applicationEventPublisher::publishEvent);
     }
@@ -212,7 +212,7 @@ public class ApplicationEventHandlerExtension {
     @EventListener
     @Async
     void on(ApplicationCreatedFromSickNoteEvent event) {
-        getAbsencePeriods(event.getApplication())
+        getAbsencePeriods(event.application())
             .map(toApplicationCreatedFromSickNoteEventDTO(tenantSupplier.get(), event))
             .ifPresent(applicationEventPublisher::publishEvent);
     }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/extension/application/ApplicationEventRepublisher.java b/src/main/java/org/synyx/urlaubsverwaltung/extension/application/ApplicationEventRepublisher.java
index 4f0607357..7cf0784e3 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/extension/application/ApplicationEventRepublisher.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/extension/application/ApplicationEventRepublisher.java
@@ -50,7 +50,7 @@ public class ApplicationEventRepublisher {
             .stream()
             .map(ApplicationAllowedEvent::of)
             .forEach(event -> {
-                LOG.info("Publishing ApplicationAllowedEvent with id={} for personId={} with startDate={} and endDate={}", event.getApplication().getId(), event.getApplication().getPerson().getId(), event.getApplication().getStartDate(), event.getApplication().getEndDate());
+                LOG.info("Publishing ApplicationAllowedEvent with id={} for personId={} with startDate={} and endDate={}", event.application().getId(), event.application().getPerson().getId(), event.application().getStartDate(), event.application().getEndDate());
                 applicationEventHandlerExtension.on(event);
             });
 
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 34021698e..afd129873 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/extension/sicknote/SickNoteEventHandlerExtension.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/extension/sicknote/SickNoteEventHandlerExtension.java
@@ -97,21 +97,21 @@ public class SickNoteEventHandlerExtension {
 
     private static Function<AbsencePeriod, SickNoteCancelledEventDTO> toSickNoteCancelledEventDTO(String tenantId, SickNoteCancelledEvent event) {
         return absencePeriod -> {
-            final SickNotePersonDTO person = toSickNotePersonDTO(event.getSickNote().getPerson());
-            final SickNotePersonDTO applier = event.getSickNote().getApplier() != null ? toSickNotePersonDTO(event.getSickNote().getApplier()) : null;
-            final SickNotePeriodDTO period = toPeriod(event.getSickNote());
-            final SickNotePeriodDTO medicalCertificatePeriod = toMedicalCertificatePeriod(event.getSickNote());
+            final SickNotePersonDTO person = toSickNotePersonDTO(event.sickNote().getPerson());
+            final SickNotePersonDTO applier = event.sickNote().getApplier() != null ? toSickNotePersonDTO(event.sickNote().getApplier()) : null;
+            final SickNotePeriodDTO period = toPeriod(event.sickNote());
+            final SickNotePeriodDTO medicalCertificatePeriod = toMedicalCertificatePeriod(event.sickNote());
             final Set<LocalDate> absentWorkingDays = toAbsentWorkingDays(absencePeriod);
 
             return SickNoteCancelledEventDTO.builder()
-                .id(event.getId())
-                .sourceId(event.getSickNote().getId())
-                .createdAt(event.getCreatedAt())
+                .id(event.id())
+                .sourceId(event.sickNote().getId())
+                .createdAt(event.createdAt())
                 .tenantId(tenantId)
                 .person(person)
                 .applier(applier)
-                .type(toSickNoteType(event.getSickNote()))
-                .status(toStatus(event.getSickNote()))
+                .type(toSickNoteType(event.sickNote()))
+                .status(toStatus(event.sickNote()))
                 .period(period)
                 .medicalCertificatePeriod(medicalCertificatePeriod)
                 .absentWorkingDays(absentWorkingDays)
@@ -122,21 +122,21 @@ public class SickNoteEventHandlerExtension {
 
     private static Function<AbsencePeriod, SickNoteCreatedEventDTO> toSickNoteCreatedEventDTO(String tenantId, SickNoteCreatedEvent event) {
         return absencePeriod -> {
-            final SickNotePersonDTO person = toSickNotePersonDTO(event.getSickNote().getPerson());
-            final SickNotePersonDTO applier = event.getSickNote().getApplier() != null ? toSickNotePersonDTO(event.getSickNote().getApplier()) : null;
-            final SickNotePeriodDTO period = toPeriod(event.getSickNote());
-            final SickNotePeriodDTO medicalCertificatePeriod = toMedicalCertificatePeriod(event.getSickNote());
+            final SickNotePersonDTO person = toSickNotePersonDTO(event.sickNote().getPerson());
+            final SickNotePersonDTO applier = event.sickNote().getApplier() != null ? toSickNotePersonDTO(event.sickNote().getApplier()) : null;
+            final SickNotePeriodDTO period = toPeriod(event.sickNote());
+            final SickNotePeriodDTO medicalCertificatePeriod = toMedicalCertificatePeriod(event.sickNote());
             final Set<LocalDate> absentWorkingDays = toAbsentWorkingDays(absencePeriod);
 
             return SickNoteCreatedEventDTO.builder()
-                .id(event.getId())
-                .sourceId(event.getSickNote().getId())
-                .createdAt(event.getCreatedAt())
+                .id(event.id())
+                .sourceId(event.sickNote().getId())
+                .createdAt(event.createdAt())
                 .tenantId(tenantId)
                 .person(person)
                 .applier(applier)
-                .type(toSickNoteType(event.getSickNote()))
-                .status(toStatus(event.getSickNote()))
+                .type(toSickNoteType(event.sickNote()))
+                .status(toStatus(event.sickNote()))
                 .period(period)
                 .medicalCertificatePeriod(medicalCertificatePeriod)
                 .absentWorkingDays(absentWorkingDays)
@@ -147,21 +147,21 @@ public class SickNoteEventHandlerExtension {
 
     private static Function<AbsencePeriod, SickNoteUpdatedEventDTO> toSickNoteUpdatedEventDTO(String tenantId, SickNoteUpdatedEvent event) {
         return absencePeriod -> {
-            final SickNotePersonDTO person = toSickNotePersonDTO(event.getSickNote().getPerson());
-            final SickNotePersonDTO applier = event.getSickNote().getApplier() != null ? toSickNotePersonDTO(event.getSickNote().getApplier()) : null;
-            final SickNotePeriodDTO period = toPeriod(event.getSickNote());
-            final SickNotePeriodDTO medicalCertificatePeriod = toMedicalCertificatePeriod(event.getSickNote());
+            final SickNotePersonDTO person = toSickNotePersonDTO(event.sickNote().getPerson());
+            final SickNotePersonDTO applier = event.sickNote().getApplier() != null ? toSickNotePersonDTO(event.sickNote().getApplier()) : null;
+            final SickNotePeriodDTO period = toPeriod(event.sickNote());
+            final SickNotePeriodDTO medicalCertificatePeriod = toMedicalCertificatePeriod(event.sickNote());
             final Set<LocalDate> absentWorkingDays = toAbsentWorkingDays(absencePeriod);
 
             return SickNoteUpdatedEventDTO.builder()
-                .id(event.getId())
-                .sourceId(event.getSickNote().getId())
-                .createdAt(event.getCreatedAt())
+                .id(event.id())
+                .sourceId(event.sickNote().getId())
+                .createdAt(event.createdAt())
                 .tenantId(tenantId)
                 .person(person)
                 .applier(applier)
-                .type(toSickNoteType(event.getSickNote()))
-                .status(toStatus(event.getSickNote()))
+                .type(toSickNoteType(event.sickNote()))
+                .status(toStatus(event.sickNote()))
                 .period(period)
                 .medicalCertificatePeriod(medicalCertificatePeriod)
                 .absentWorkingDays(absentWorkingDays)
@@ -172,21 +172,21 @@ public class SickNoteEventHandlerExtension {
 
     private static Function<AbsencePeriod, SickNoteConvertedToApplicationEventDTO> toSickNoteConvertedEventDTO(String tenantId, SickNoteToApplicationConvertedEvent event) {
         return absencePeriod -> {
-            final SickNotePersonDTO person = toSickNotePersonDTO(event.getSickNote().getPerson());
-            final SickNotePersonDTO applier = event.getSickNote().getApplier() != null ? toSickNotePersonDTO(event.getSickNote().getApplier()) : null;
-            final SickNotePeriodDTO period = toPeriod(event.getSickNote());
-            final SickNotePeriodDTO medicalCertificatePeriod = toMedicalCertificatePeriod(event.getSickNote());
+            final SickNotePersonDTO person = toSickNotePersonDTO(event.sickNote().getPerson());
+            final SickNotePersonDTO applier = event.sickNote().getApplier() != null ? toSickNotePersonDTO(event.sickNote().getApplier()) : null;
+            final SickNotePeriodDTO period = toPeriod(event.sickNote());
+            final SickNotePeriodDTO medicalCertificatePeriod = toMedicalCertificatePeriod(event.sickNote());
             final Set<LocalDate> absentWorkingDays = toAbsentWorkingDays(absencePeriod);
 
             return SickNoteConvertedToApplicationEventDTO.builder()
-                .id(event.getId())
-                .sourceId(event.getSickNote().getId())
-                .createdAt(event.getCreatedAt())
+                .id(event.id())
+                .sourceId(event.sickNote().getId())
+                .createdAt(event.createdAt())
                 .tenantId(tenantId)
                 .person(person)
                 .applier(applier)
-                .type(toSickNoteType(event.getSickNote()))
-                .status(toStatus(event.getSickNote()))
+                .type(toSickNoteType(event.sickNote()))
+                .status(toStatus(event.sickNote()))
                 .period(period)
                 .medicalCertificatePeriod(medicalCertificatePeriod)
                 .absentWorkingDays(absentWorkingDays)
@@ -197,7 +197,7 @@ public class SickNoteEventHandlerExtension {
     @EventListener
     @Async
     void on(SickNoteCancelledEvent event) {
-        getClosedAbsencePeriods(event.getSickNote())
+        getClosedAbsencePeriods(event.sickNote())
             .map(toSickNoteCancelledEventDTO(tenantSupplier.get(), event))
             .ifPresent(applicationEventPublisher::publishEvent);
     }
@@ -205,7 +205,7 @@ public class SickNoteEventHandlerExtension {
     @EventListener
     @Async
     void on(SickNoteCreatedEvent event) {
-        getAbsencePeriods(event.getSickNote())
+        getAbsencePeriods(event.sickNote())
             .map(toSickNoteCreatedEventDTO(tenantSupplier.get(), event))
             .ifPresent(applicationEventPublisher::publishEvent);
     }
@@ -213,7 +213,7 @@ public class SickNoteEventHandlerExtension {
     @EventListener
     @Async
     void on(SickNoteUpdatedEvent event) {
-        getAbsencePeriods(event.getSickNote())
+        getAbsencePeriods(event.sickNote())
             .map(toSickNoteUpdatedEventDTO(tenantSupplier.get(), event))
             .ifPresent(applicationEventPublisher::publishEvent);
     }
@@ -221,7 +221,7 @@ public class SickNoteEventHandlerExtension {
     @EventListener
     @Async
     void on(SickNoteToApplicationConvertedEvent event) {
-        getAbsencePeriods(event.getSickNote())
+        getAbsencePeriods(event.sickNote())
             .map(toSickNoteConvertedEventDTO(tenantSupplier.get(), event))
             .ifPresent(applicationEventPublisher::publishEvent);
     }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/extension/sicknote/SickNoteEventRepublisher.java b/src/main/java/org/synyx/urlaubsverwaltung/extension/sicknote/SickNoteEventRepublisher.java
index 971e64cb2..5fe0f09a8 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/extension/sicknote/SickNoteEventRepublisher.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/extension/sicknote/SickNoteEventRepublisher.java
@@ -49,7 +49,7 @@ public class SickNoteEventRepublisher {
             .stream()
             .map(SickNoteCreatedEvent::of)
             .forEach(event -> {
-                LOG.info("Publishing sickNoteCreatedEvent with id={} for personId={} with startDate={} and endDate={}", event.getSickNote().getId(), event.getSickNote().getPerson().getId(), event.getSickNote().getStartDate(), event.getSickNote().getEndDate());
+                LOG.info("Publishing sickNoteCreatedEvent with id={} for personId={} with startDate={} and endDate={}", event.sickNote().getId(), event.sickNote().getPerson().getId(), event.sickNote().getStartDate(), event.sickNote().getEndDate());
                 sickNoteEventHandlerExtension.on(event);
             });
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/notification/UserNotificationSettingsServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/notification/UserNotificationSettingsServiceImpl.java
index 3a325d233..8fde07a66 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/notification/UserNotificationSettingsServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/notification/UserNotificationSettingsServiceImpl.java
@@ -24,14 +24,14 @@ class UserNotificationSettingsServiceImpl implements UserNotificationSettingsSer
 
     @Override
     public UserNotificationSettings findNotificationSettings(PersonId personId) {
-        return repository.findById(personId.getValue()).map(UserNotificationSettingsServiceImpl::toNotification)
+        return repository.findById(personId.value()).map(UserNotificationSettingsServiceImpl::toNotification)
             .orElseGet(() -> defaultNotificationSettings(personId));
     }
 
     @Override
     public Map<PersonId, UserNotificationSettings> findNotificationSettings(Collection<PersonId> personIds) {
 
-        final List<Long> personIdValues = personIds.stream().map(PersonId::getValue).collect(toList());
+        final List<Long> personIdValues = personIds.stream().map(PersonId::value).collect(toList());
 
         final Map<PersonId, UserNotificationSettings> notificationsByPerson = repository.findAllById(personIdValues).stream()
             .map(UserNotificationSettingsServiceImpl::toNotification)
@@ -49,7 +49,7 @@ class UserNotificationSettingsServiceImpl implements UserNotificationSettingsSer
     public UserNotificationSettings updateNotificationSettings(PersonId personId, boolean restrictToDepartments) {
 
         final UserNotificationSettingsEntity entity = new UserNotificationSettingsEntity();
-        entity.setPersonId(personId.getValue());
+        entity.setPersonId(personId.value());
         entity.setRestrictToDepartments(restrictToDepartments);
 
         return toNotification(repository.save(entity));
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/overlap/OverlapService.java b/src/main/java/org/synyx/urlaubsverwaltung/overlap/OverlapService.java
index 74d013179..202f6b19f 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/overlap/OverlapService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/overlap/OverlapService.java
@@ -218,8 +218,8 @@ public class OverlapService {
             return List.of();
         }
 
-        final LocalDate firstOverlapStart = listOfOverlaps.get(0).getStartDate();
-        final LocalDate lastOverlapEnd = listOfOverlaps.get(listOfOverlaps.size() - 1).getEndDate();
+        final LocalDate firstOverlapStart = listOfOverlaps.getFirst().startDate();
+        final LocalDate lastOverlapEnd = listOfOverlaps.getLast().endDate();
 
         final List<DateRange> listOfGaps = new ArrayList<>();
         if (startDate.isBefore(firstOverlapStart)) {
@@ -258,8 +258,8 @@ public class OverlapService {
     private boolean intervalsHaveGap(DateRange firstInterval, DateRange secondInterval) {
 
         // test if end of interval is equals resp. one day plus of start of other interval
-        final LocalDate endOfFirstInterval = firstInterval.getEndDate();
-        final LocalDate startOfSecondInterval = secondInterval.getStartDate();
+        final LocalDate endOfFirstInterval = firstInterval.endDate();
+        final LocalDate startOfSecondInterval = secondInterval.startDate();
 
         return !(endOfFirstInterval.equals(startOfSecondInterval) || endOfFirstInterval.plusDays(1).equals(startOfSecondInterval));
     }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/overtime/Overtime.java b/src/main/java/org/synyx/urlaubsverwaltung/overtime/Overtime.java
index bdf07e8ea..4e1806e08 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/overtime/Overtime.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/overtime/Overtime.java
@@ -138,7 +138,7 @@ public class Overtime {
 
     public Map<Integer, Duration> getDurationByYear() {
         return this.splitByYear().stream()
-            .collect(toMap(dateRangeForYear -> dateRangeForYear.getStartDate().getYear(), this::getDurationForDateRange));
+            .collect(toMap(dateRangeForYear -> dateRangeForYear.startDate().getYear(), this::getDurationForDateRange));
     }
 
     public Duration getTotalDurationBefore(int year) {
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/overtime/OvertimeServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/overtime/OvertimeServiceImpl.java
index da0a1f29d..ecfc90497 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/overtime/OvertimeServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/overtime/OvertimeServiceImpl.java
@@ -158,11 +158,11 @@ class OvertimeServiceImpl implements OvertimeService {
 
                 // overall
                 final Duration yearDuration = yearOvertimeSumByPerson.getOrDefault(person, ZERO);
-                final Duration finalOverallDuration = overallOvertimeBeforeYear.plus(yearDuration).minus(personOvertimeReduction.getReductionOverall());
+                final Duration finalOverallDuration = overallOvertimeBeforeYear.plus(yearDuration).minus(personOvertimeReduction.reductionOverall());
 
                 // date range
                 final Duration dateRangeDuration = dateRangeOvertimeSumByPerson.getOrDefault(person, ZERO);
-                final Duration finalDateRangeDuration = overallOvertimeBeforeYear.plus(dateRangeDuration).minus(personOvertimeReduction.getReductionDateRange());
+                final Duration finalDateRangeDuration = overallOvertimeBeforeYear.plus(dateRangeDuration).minus(personOvertimeReduction.reductionDateRange());
 
                 return Map.entry(person, new LeftOvertime(finalOverallDuration, finalDateRangeDuration));
             })
@@ -264,7 +264,7 @@ class OvertimeServiceImpl implements OvertimeService {
      */
     @EventListener
     void deleteAll(PersonDeletedEvent event) {
-        final Person personToBeDeleted = event.getPerson();
+        final Person personToBeDeleted = event.person();
         overtimeCommentRepository.deleteByOvertimePerson(personToBeDeleted);
         deleteCommentAuthor(personToBeDeleted);
         overtimeRepository.deleteByPerson(personToBeDeleted);
@@ -283,23 +283,7 @@ class OvertimeServiceImpl implements OvertimeService {
             .orElse(ZERO);
     }
 
-    private static class OvertimeReduction {
-
-        private final Duration reductionOverall;
-        private final Duration reductionDateRange;
-
-        OvertimeReduction(Duration reductionOverall, Duration reductionDateRange) {
-            this.reductionOverall = reductionOverall;
-            this.reductionDateRange = reductionDateRange;
-        }
-
-        Duration getReductionOverall() {
-            return reductionOverall;
-        }
-
-        Duration getReductionDateRange() {
-            return reductionDateRange;
-        }
+    private record OvertimeReduction(Duration reductionOverall, Duration reductionDateRange) {
 
         static OvertimeReduction identity() {
             return new OvertimeReduction(ZERO, ZERO);
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/person/PersonDeletedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/person/PersonDeletedEvent.java
index 337eb282b..c499d7e0b 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/PersonDeletedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/PersonDeletedEvent.java
@@ -1,14 +1,5 @@
 package org.synyx.urlaubsverwaltung.person;
 
-public class PersonDeletedEvent {
+public record PersonDeletedEvent(Person person) {
 
-    private final Person person;
-
-    public PersonDeletedEvent(Person person) {
-        this.person = person;
-    }
-
-    public Person getPerson() {
-        return person;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/person/PersonId.java b/src/main/java/org/synyx/urlaubsverwaltung/person/PersonId.java
index d446f6b78..8fea312f2 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/PersonId.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/PersonId.java
@@ -1,36 +1,4 @@
 package org.synyx.urlaubsverwaltung.person;
 
-import java.util.Objects;
-
-public class PersonId {
-
-    private final Long value;
-
-    public PersonId(Long value) {
-        this.value = value;
-    }
-
-    public Long getValue() {
-        return value;
-    }
-
-    @Override
-    public String toString() {
-        return "PersonId{" +
-            "value=" + value +
-            '}';
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        PersonId personId = (PersonId) o;
-        return Objects.equals(value, personId.value);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(value);
-    }
+public record PersonId(Long value) {
 }
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 07be4fd7c..e80e97936 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataDtoMapper.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataDtoMapper.java
@@ -10,7 +10,7 @@ final class PersonBasedataDtoMapper {
 
     static PersonBasedataDto mapToPersonBasedataDto(PersonBasedata personBasedata, Person person) {
         final PersonBasedataDto personBasedataDto = new PersonBasedataDto();
-        personBasedataDto.setPersonId(personBasedata.getPersonId().getValue());
+        personBasedataDto.setPersonId(personBasedata.getPersonId().value());
         personBasedataDto.setPersonnelNumber(personBasedata.getPersonnelNumber());
         personBasedataDto.setAdditionalInfo(personBasedata.getAdditionalInformation());
         personBasedataDto.setNiceName(person.getNiceName());
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 c8c7bc626..384f91905 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataMapper.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataMapper.java
@@ -18,7 +18,7 @@ class PersonBasedataMapper {
 
     public static PersonBasedataEntity mapToEntity(PersonBasedata personBasedata) {
         final PersonBasedataEntity personBasedataEntity = new PersonBasedataEntity();
-        personBasedataEntity.setPersonId(personBasedata.getPersonId().getValue());
+        personBasedataEntity.setPersonId(personBasedata.getPersonId().value());
         personBasedataEntity.setPersonnelNumber(personBasedata.getPersonnelNumber());
         personBasedataEntity.setAdditionalInformation(personBasedata.getAdditionalInformation());
         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 dd7951533..376c846e8 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/basedata/PersonBasedataServiceImpl.java
@@ -47,6 +47,6 @@ class PersonBasedataServiceImpl implements PersonBasedataService {
      */
     @EventListener
     void delete(PersonDeletedEvent event) {
-        personBasedataRepository.deleteByPerson(event.getPerson());
+        personBasedataRepository.deleteByPerson(event.person());
     }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/person/extension/PersonEventHandlerExtension.java b/src/main/java/org/synyx/urlaubsverwaltung/person/extension/PersonEventHandlerExtension.java
index ffdd113b4..3a6fccf79 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/extension/PersonEventHandlerExtension.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/extension/PersonEventHandlerExtension.java
@@ -67,7 +67,7 @@ class PersonEventHandlerExtension {
     @Async
     @EventListener
     void on(PersonDeletedEvent event) {
-        final Person person = event.getPerson();
+        final Person person = event.person();
         final PersonDeletedEventDTO eventToPublish = PersonDeletedEventDTO.create(tenantSupplier.get(), person.getId(), person.getUsername(), person.getLastName(), person.getFirstName(), person.getEmail(), person.isActive());
         applicationEventPublisher.publishEvent(eventToPublish);
     }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonPermissionsViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonPermissionsViewController.java
index 66326cc14..e4e83c64e 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonPermissionsViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/person/web/PersonPermissionsViewController.java
@@ -44,9 +44,13 @@ public class PersonPermissionsViewController implements HasLaunchpad {
     private final SessionService sessionService;
 
     @Autowired
-    public PersonPermissionsViewController(PersonService personService, DepartmentService departmentService,
-                                           PersonMailService personMailService, PersonPermissionsDtoValidator validator,
-                                           SessionService sessionService) {
+    PersonPermissionsViewController(
+        PersonService personService,
+        DepartmentService departmentService,
+        PersonMailService personMailService,
+        PersonPermissionsDtoValidator validator,
+        SessionService sessionService
+    ) {
         this.personService = personService;
         this.departmentService = departmentService;
         this.personMailService = personMailService;
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHoliday.java b/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHoliday.java
index 695da9b97..a4ec0afcb 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHoliday.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHoliday.java
@@ -14,29 +14,7 @@ import static org.synyx.urlaubsverwaltung.period.DayLength.NOON;
  * Describes a public holiday with the UV specific setting if it is a half public holiday or not.
  * (e.g. christmas eve can be configured to be a NOON public holiday for instance.)
  */
-public final class PublicHoliday {
-
-    private final LocalDate date;
-    private final DayLength dayLength;
-    private final String description;
-
-    public PublicHoliday(LocalDate date, DayLength dayLength, String description) {
-        this.date = date;
-        this.dayLength = dayLength;
-        this.description = description;
-    }
-
-    public LocalDate getDate() {
-        return date;
-    }
-
-    public DayLength getDayLength() {
-        return dayLength;
-    }
-
-    public String getDescription() {
-        return description;
-    }
+public record PublicHoliday(LocalDate date, DayLength dayLength, String description) {
 
     public boolean isMorning() {
         return dayLength.equals(MORNING);
@@ -66,13 +44,4 @@ public final class PublicHoliday {
     public int hashCode() {
         return Objects.hash(date);
     }
-
-    @Override
-    public String toString() {
-        return "PublicHoliday{" +
-            "date=" + date +
-            ", dayLength=" + dayLength +
-            ", description='" + description + '\'' +
-            '}';
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayApiController.java b/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayApiController.java
index edb134c98..e19c9dd23 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayApiController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayApiController.java
@@ -133,7 +133,7 @@ public class PublicHolidayApiController {
 
         final List<PublicHolidayDto> publicHolidays = workingTimeService.getFederalStatesByPersonAndDateRange(person, dateRange)
             .entrySet().stream()
-            .map(entry -> getPublicHolidays(entry.getKey().getStartDate(), entry.getKey().getEndDate(), entry.getValue(), workingTimeSettings))
+            .map(entry -> getPublicHolidays(entry.getKey().startDate(), entry.getKey().endDate(), entry.getValue(), workingTimeSettings))
             .flatMap(List::stream)
             .sorted(Comparator.comparing(PublicHolidayDto::getDate))
             .toList();
@@ -154,6 +154,6 @@ public class PublicHolidayApiController {
     }
 
     private PublicHolidayDto mapPublicHolidayToDto(PublicHoliday publicHoliday) {
-        return new PublicHolidayDto(publicHoliday, publicHoliday.getDayLength().getDuration(), publicHoliday.getDayLength().name());
+        return new PublicHolidayDto(publicHoliday, publicHoliday.dayLength().getDuration(), publicHoliday.dayLength().name());
     }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayDto.java b/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayDto.java
index d79269606..fce65bb27 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayDto.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayDto.java
@@ -10,8 +10,8 @@ public final class PublicHolidayDto {
     private final String absencePeriodName;
 
     PublicHolidayDto(PublicHoliday publicHoliday, BigDecimal dayLength, String absencePeriodName) {
-        this.date = publicHoliday.getDate().toString();
-        this.description = publicHoliday.getDescription();
+        this.date = publicHoliday.date().toString();
+        this.description = publicHoliday.description();
         this.dayLength = dayLength;
         this.absencePeriodName = absencePeriodName;
     }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/search/SortComparator.java b/src/main/java/org/synyx/urlaubsverwaltung/search/SortComparator.java
index 87e000d6c..c598bb81a 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/search/SortComparator.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/search/SortComparator.java
@@ -66,7 +66,7 @@ public class SortComparator<T> implements Comparator<T> {
 
         final String errorMessage = format("type=\"%s\" does not contain property=\"%s\".", type, String.join(".", properties));
 
-        final PropertyDescriptor propertyDescriptor = BeanUtils.getPropertyDescriptor(type, properties.get(0));
+        final PropertyDescriptor propertyDescriptor = BeanUtils.getPropertyDescriptor(type, properties.getFirst());
         if (propertyDescriptor == null) {
             LOG.debug(errorMessage);
             return null;
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/security/SessionServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/security/SessionServiceImpl.java
index 943d404c7..483893238 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/security/SessionServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/security/SessionServiceImpl.java
@@ -39,7 +39,7 @@ class SessionServiceImpl<S extends Session> implements SessionService {
 
     @EventListener
     void deleteSessionByEvent(PersonDeletedEvent event) {
-        sessionRepository.findByPrincipalName(event.getPerson().getUsername())
+        sessionRepository.findByPrincipalName(event.person().getUsername())
             .forEach((s, session) -> sessionRepository.deleteById(session.getId()));
     }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/settings/SettingsAbsenceTypesViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/settings/SettingsAbsenceTypesViewController.java
index 0c7ec12f5..9f7187a8f 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/settings/SettingsAbsenceTypesViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/settings/SettingsAbsenceTypesViewController.java
@@ -45,11 +45,13 @@ public class SettingsAbsenceTypesViewController implements HasLaunchpad {
     private final SettingsAbsenceTypesDtoValidator validator;
 
     @Autowired
-    public SettingsAbsenceTypesViewController(SettingsService settingsService,
-                                              VacationTypeService vacationTypeService,
-                                              SpecialLeaveSettingsService specialLeaveService,
-                                              MessageSource messageSource,
-                                              SettingsAbsenceTypesDtoValidator validator) {
+    SettingsAbsenceTypesViewController(
+        SettingsService settingsService,
+        VacationTypeService vacationTypeService,
+        SpecialLeaveSettingsService specialLeaveService,
+        MessageSource messageSource,
+        SettingsAbsenceTypesDtoValidator validator
+    ) {
         this.settingsService = settingsService;
         this.vacationTypeService = vacationTypeService;
         this.specialLeaveSettingsService = specialLeaveService;
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 95b379b41..a0da57a77 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysStatisticsViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sickdays/SickDaysStatisticsViewController.java
@@ -87,9 +87,9 @@ class SickDaysStatisticsViewController {
 
         final HttpHeaders headers = new HttpHeaders();
         headers.setContentType(new MediaType("text", "csv", UTF_8));
-        headers.setContentDisposition(ContentDisposition.builder("attachment").filename(csvFile.getFileName(), UTF_8).build());
+        headers.setContentDisposition(ContentDisposition.builder("attachment").filename(csvFile.fileName(), UTF_8).build());
 
-        return ResponseEntity.status(OK).headers(headers).body(csvFile.getResource());
+        return ResponseEntity.status(OK).headers(headers).body(csvFile.resource());
     }
 
     private FilterPeriod toFilterPeriod(String startDateString, String endDateString, Locale locale) {
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteCancelledEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteCancelledEvent.java
index 736c0adb3..995a40c5e 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteCancelledEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteCancelledEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.sicknote.sicknote;
 import java.time.Instant;
 import java.util.UUID;
 
-public class SickNoteCancelledEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final SickNote sickNote;
-
-    public SickNoteCancelledEvent(UUID id, Instant createdAt, SickNote sickNote) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.sickNote = sickNote;
-    }
+public record SickNoteCancelledEvent(UUID id, Instant createdAt, SickNote sickNote) {
 
     public static SickNoteCancelledEvent of(SickNote sickNote) {
         return new SickNoteCancelledEvent(UUID.randomUUID(), Instant.now(), sickNote);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public SickNote getSickNote() {
-        return sickNote;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteCreatedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteCreatedEvent.java
index 60d5280da..613d2edbd 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteCreatedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteCreatedEvent.java
@@ -3,30 +3,9 @@ package org.synyx.urlaubsverwaltung.sicknote.sicknote;
 import java.time.Instant;
 import java.util.UUID;
 
-public class SickNoteCreatedEvent {
-    private final UUID id;
-    private final Instant createdAt;
-    private final SickNote sickNote;
-
-    public SickNoteCreatedEvent(UUID id, Instant createdAt, SickNote sickNote) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.sickNote = sickNote;
-    }
+public record SickNoteCreatedEvent(UUID id, Instant createdAt, SickNote sickNote) {
 
     public static SickNoteCreatedEvent of(SickNote sickNote) {
         return new SickNoteCreatedEvent(UUID.randomUUID(), Instant.now(), sickNote);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public SickNote getSickNote() {
-        return sickNote;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteDeletedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteDeletedEvent.java
index 4dcf8ba9b..1a56ae1e2 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteDeletedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteDeletedEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.sicknote.sicknote;
 import java.time.Instant;
 import java.util.UUID;
 
-public class SickNoteDeletedEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final SickNote sickNote;
-
-    public SickNoteDeletedEvent(UUID id, Instant createdAt, SickNote sickNote) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.sickNote = sickNote;
-    }
+public record SickNoteDeletedEvent(UUID id, Instant createdAt, SickNote sickNote) {
 
     public static SickNoteDeletedEvent of(SickNote sickNote) {
         return new SickNoteDeletedEvent(UUID.randomUUID(), Instant.now(), sickNote);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public SickNote getSickNote() {
-        return sickNote;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteInteractionServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteInteractionServiceImpl.java
index 428cfd03e..e9d131509 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteInteractionServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteInteractionServiceImpl.java
@@ -165,7 +165,7 @@ class SickNoteInteractionServiceImpl implements SickNoteInteractionService {
      */
     @EventListener
     void deleteAll(PersonDeletedEvent event) {
-        final Person personToBeDeleted = event.getPerson();
+        final Person personToBeDeleted = event.person();
         commentService.deleteAllBySickNotePerson(personToBeDeleted);
         commentService.deleteCommentAuthor(personToBeDeleted);
         final List<SickNote> deletedSickNotes = sickNoteService.deleteAllByPerson(personToBeDeleted);
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteToApplicationConvertedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteToApplicationConvertedEvent.java
index a25ad0a78..95e8e3592 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteToApplicationConvertedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteToApplicationConvertedEvent.java
@@ -5,37 +5,9 @@ import org.synyx.urlaubsverwaltung.application.application.Application;
 import java.time.Instant;
 import java.util.UUID;
 
-public class SickNoteToApplicationConvertedEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final SickNote sickNote;
-    private final Application application;
-
-    public SickNoteToApplicationConvertedEvent(UUID id, Instant createdAt, SickNote sickNote, Application application) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.sickNote = sickNote;
-        this.application = application;
-    }
+public record SickNoteToApplicationConvertedEvent(UUID id, Instant createdAt, SickNote sickNote, Application application) {
 
     public static SickNoteToApplicationConvertedEvent of(SickNote sickNote, Application application) {
         return new SickNoteToApplicationConvertedEvent(UUID.randomUUID(), Instant.now(), sickNote, application);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public SickNote getSickNote() {
-        return sickNote;
-    }
-
-    public Application getApplication() {
-        return application;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteUpdatedEvent.java b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteUpdatedEvent.java
index 1fe9d9706..99a4ce226 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteUpdatedEvent.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteUpdatedEvent.java
@@ -3,31 +3,9 @@ package org.synyx.urlaubsverwaltung.sicknote.sicknote;
 import java.time.Instant;
 import java.util.UUID;
 
-public class SickNoteUpdatedEvent {
-
-    private final UUID id;
-    private final Instant createdAt;
-    private final SickNote sickNote;
-
-    public SickNoteUpdatedEvent(UUID id, Instant createdAt, SickNote sickNote) {
-        this.id = id;
-        this.createdAt = createdAt;
-        this.sickNote = sickNote;
-    }
+public record SickNoteUpdatedEvent(UUID id, Instant createdAt, SickNote sickNote) {
 
     public static SickNoteUpdatedEvent of(SickNote sickNote) {
         return new SickNoteUpdatedEvent(UUID.randomUUID(), Instant.now(), sickNote);
     }
-
-    public UUID getId() {
-        return id;
-    }
-
-    public Instant getCreatedAt() {
-        return createdAt;
-    }
-
-    public SickNote getSickNote() {
-        return sickNote;
-    }
 }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/user/UserSettingsServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/user/UserSettingsServiceImpl.java
index 1a0b98f54..169261966 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/user/UserSettingsServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/user/UserSettingsServiceImpl.java
@@ -43,7 +43,7 @@ class UserSettingsServiceImpl implements UserSettingsService {
 
     @EventListener
     void delete(PersonDeletedEvent event) {
-        userSettingsRepository.deleteByPerson(event.getPerson());
+        userSettingsRepository.deleteByPerson(event.person());
     }
 
     @EventListener
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/user/pagination/UserPaginationSettingsService.java b/src/main/java/org/synyx/urlaubsverwaltung/user/pagination/UserPaginationSettingsService.java
index 45ab768b2..217a6d822 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/user/pagination/UserPaginationSettingsService.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/user/pagination/UserPaginationSettingsService.java
@@ -29,7 +29,7 @@ class UserPaginationSettingsService {
     }
 
     private UserPaginationSettings findByPersonId(PersonId personId) {
-        return repository.findByPersonId(personId.getValue())
+        return repository.findByPersonId(personId.value())
             .map(UserPaginationSettingsService::toUserPaginationSettings)
             .orElseGet(this::defaultUserPaginationSettings);
     }
@@ -45,7 +45,7 @@ class UserPaginationSettingsService {
     private static UserPaginationSettingsEntity toUserPaginationSettingsEntity(PersonId personId, UserPaginationSettings userPaginationSettings) {
         final UserPaginationSettingsEntity entity = new UserPaginationSettingsEntity();
         entity.setPerson(null);
-        entity.setPersonId(personId.getValue());
+        entity.setPersonId(personId.value());
         entity.setDefaultPageSize(userPaginationSettings.getDefaultPageSize());
         return entity;
     }
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeCalendar.java b/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeCalendar.java
index ba232680b..ea1f336d9 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeCalendar.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeCalendar.java
@@ -23,13 +23,7 @@ import java.util.Optional;
  * <p>
  * Should be used in combination with a {@link Map} to keep relation to a {@link org.synyx.urlaubsverwaltung.person.Person} for example.
  */
-public class WorkingTimeCalendar {
-
-    private final Map<LocalDate, WorkingDayInformation> workingDays;
-
-    public WorkingTimeCalendar(Map<LocalDate, WorkingDayInformation> workingDays) {
-        this.workingDays = workingDays;
-    }
+public record WorkingTimeCalendar(Map<LocalDate, WorkingDayInformation> workingDays) {
 
     /**
      * @param application
@@ -115,10 +109,6 @@ public class WorkingTimeCalendar {
         return sum;
     }
 
-    public Map<LocalDate, WorkingDayInformation> getWorkingDays() {
-        return workingDays;
-    }
-
     public record WorkingDayInformation(
         DayLength dayLength,
         WorkingDayInformation.WorkingTimeCalendarEntryType morning,
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeCalendarServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeCalendarServiceImpl.java
index f0e19bcf2..2c8817747 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeCalendarServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeCalendarServiceImpl.java
@@ -53,8 +53,8 @@ class WorkingTimeCalendarServiceImpl implements WorkingTimeCalendarService {
             .map(entity -> toWorkingTime(entity, federalStateCachedSupplier))
             .collect(groupingBy(WorkingTime::getPerson));
 
-        final LocalDate start = dateRange.getStartDate();
-        final LocalDate end = dateRange.getEndDate();
+        final LocalDate start = dateRange.startDate();
+        final LocalDate end = dateRange.endDate();
 
         return persons.stream().map(person -> {
             final List<WorkingTime> workingTimesInDateRange = workingTimesByPerson.getOrDefault(person, List.of())
@@ -79,7 +79,7 @@ class WorkingTimeCalendarServiceImpl implements WorkingTimeCalendarService {
                     dayLengthByDate.put(date, getWorkDayLengthForWeekDay(date, workingTime, workingTimeSettings));
                 }
 
-                if (workingTimeDateRange.getStartDate().equals(start)) {
+                if (workingTimeDateRange.startDate().equals(start)) {
                     break;
                 }
 
@@ -109,12 +109,12 @@ class WorkingTimeCalendarServiceImpl implements WorkingTimeCalendarService {
                 final PublicHoliday publicHoliday = maybePublicHoliday.get();
 
                 if (configuredWorkingTimeForDayOfWeek.isFull()) {
-                    if (publicHoliday.getDayLength().isFull()) {
+                    if (publicHoliday.dayLength().isFull()) {
                         morning = DayLength.ZERO;
                         morningType = WorkingTimeCalendarEntryType.PUBLIC_HOLIDAY;
                         noon = DayLength.ZERO;
                         noonType = WorkingTimeCalendarEntryType.PUBLIC_HOLIDAY;
-                    } else if (publicHoliday.getDayLength().isMorning()) {
+                    } else if (publicHoliday.dayLength().isMorning()) {
                         morning = DayLength.ZERO;
                         morningType = WorkingTimeCalendarEntryType.PUBLIC_HOLIDAY;
                         noon = DayLength.NOON;
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeServiceImpl.java b/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeServiceImpl.java
index 0c893e82e..8fcf0709f 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeServiceImpl.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeServiceImpl.java
@@ -97,24 +97,24 @@ class WorkingTimeServiceImpl implements WorkingTimeService, WorkingTimeWriteServ
 
         final List<WorkingTime> workingTimesByPerson = toWorkingTimes(workingTimeRepository.findByPersonOrderByValidFromDesc(person));
         final List<WorkingTime> workingTimeList = workingTimesByPerson.stream()
-            .filter(workingTime -> !workingTime.getValidFrom().isAfter(dateRange.getEndDate()))
+            .filter(workingTime -> !workingTime.getValidFrom().isAfter(dateRange.endDate()))
             .toList();
 
         final HashMap<DateRange, WorkingTime> workingTimesOfPersonByDateRange = new HashMap<>();
-        LocalDate nextEnd = dateRange.getEndDate();
+        LocalDate nextEnd = dateRange.endDate();
 
         for (WorkingTime workingTime : workingTimeList) {
 
             final DateRange range;
-            if (workingTime.getValidFrom().isBefore(dateRange.getStartDate())) {
-                range = new DateRange(dateRange.getStartDate(), nextEnd);
+            if (workingTime.getValidFrom().isBefore(dateRange.startDate())) {
+                range = new DateRange(dateRange.startDate(), nextEnd);
             } else {
                 range = new DateRange(workingTime.getValidFrom(), nextEnd);
             }
 
             workingTimesOfPersonByDateRange.put(range, workingTime);
 
-            if (!workingTime.getValidFrom().isAfter(dateRange.getStartDate())) {
+            if (!workingTime.getValidFrom().isAfter(dateRange.startDate())) {
                 return workingTimesOfPersonByDateRange;
             }
 
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeViewController.java b/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeViewController.java
index 246caebbe..4d40cc6c4 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeViewController.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeViewController.java
@@ -49,11 +49,15 @@ public class WorkingTimeViewController implements HasLaunchpad {
     private final Clock clock;
 
     @Autowired
-    public WorkingTimeViewController(PersonService personService, WorkingTimeService workingTimeService,
-                                     WorkingTimeWriteService workingTimeWriteService,
-                                     VacationTypeViewModelService vacationTypeViewModelService,
-                                     SettingsService settingsService, WorkingTimeValidator validator,
-                                     Clock clock) {
+    WorkingTimeViewController(
+        PersonService personService,
+        WorkingTimeService workingTimeService,
+        WorkingTimeWriteService workingTimeWriteService,
+        VacationTypeViewModelService vacationTypeViewModelService,
+        SettingsService settingsService,
+        WorkingTimeValidator validator,
+        Clock clock
+    ) {
         this.personService = personService;
         this.workingTimeService = workingTimeService;
         this.workingTimeWriteService = workingTimeWriteService;


Test patch:
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/absence/DateRangeTest.java b/src/test/java/org/synyx/urlaubsverwaltung/absence/DateRangeTest.java
index 0319ecf42..4b0b43773 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/absence/DateRangeTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/absence/DateRangeTest.java
@@ -116,8 +116,8 @@ class DateRangeTest {
         final DateRange rangeTwo = new DateRange(startDateTwo, endDateTwo);
 
         final Optional<DateRange> maybeOverlap = rangeOne.overlap(rangeTwo);
-        assertThat(maybeOverlap.get().getStartDate()).isEqualTo(overlapStartDate);
-        assertThat(maybeOverlap.get().getEndDate()).isEqualTo(overlapEndDate);
+        assertThat(maybeOverlap.get().startDate()).isEqualTo(overlapStartDate);
+        assertThat(maybeOverlap.get().endDate()).isEqualTo(overlapEndDate);
     }
 
     static Stream<Arguments> gapDateRanges() {
@@ -137,8 +137,8 @@ class DateRangeTest {
 
         final Optional<DateRange> maybeGap = rangeOne.gap(rangeTwo);
         assertThat(maybeGap)
-            .hasValueSatisfying(localDates -> assertThat(localDates.getStartDate()).isEqualTo(gapStartDate))
-            .hasValueSatisfying(localDates -> assertThat(localDates.getEndDate()).isEqualTo(gapEndDate));
+            .hasValueSatisfying(localDates -> assertThat(localDates.startDate()).isEqualTo(gapStartDate))
+            .hasValueSatisfying(localDates -> assertThat(localDates.endDate()).isEqualTo(gapEndDate));
     }
 
     static Stream<Arguments> gapDateRangesEmpty() {
@@ -210,10 +210,4 @@ class DateRangeTest {
             .isNotEqualTo(new Object())
             .isNotEqualTo(null);
     }
-
-    @Test
-    void hashCodeTest() {
-        final DateRange dateRange = new DateRange(LocalDate.MIN, LocalDate.MAX);
-        assertThat(dateRange.hashCode()).isEqualTo(-1163458881);
-    }
 }
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/absence/web/AbsenceOverviewViewControllerTest.java b/src/test/java/org/synyx/urlaubsverwaltung/absence/web/AbsenceOverviewViewControllerTest.java
index 29a7be2c3..7076376e3 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/absence/web/AbsenceOverviewViewControllerTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/absence/web/AbsenceOverviewViewControllerTest.java
@@ -3452,7 +3452,7 @@ class AbsenceOverviewViewControllerTest {
         when(departmentService.getNumberOfDepartments()).thenReturn(1L);
         when(departmentService.getDepartmentsPersonHasAccessTo(signedInUser)).thenReturn(List.of(department));
 
-        final AbsencePeriod.RecordMorningSick morning = new AbsencePeriod.RecordMorningSick(other, 1L, AbsencePeriod.AbsenceStatus.ACTIVE, "SICK_NOTE", 1L);;
+        final AbsencePeriod.RecordMorningSick morning = new AbsencePeriod.RecordMorningSick(other, 1L, AbsencePeriod.AbsenceStatus.ACTIVE, "SICK_NOTE", 1L);
         final AbsencePeriod.Record record = new AbsencePeriod.Record(LocalDate.now(clock), other, morning, null);
         final AbsencePeriod absencePeriodVacation = new AbsencePeriod(List.of(record));
 
@@ -3708,7 +3708,7 @@ class AbsenceOverviewViewControllerTest {
         when(departmentService.getNumberOfDepartments()).thenReturn(1L);
         when(departmentService.getDepartmentsPersonHasAccessTo(signedInUser)).thenReturn(List.of(department));
 
-        final AbsencePeriod.RecordMorningSick morning = new AbsencePeriod.RecordMorningSick(other, 1L, AbsencePeriod.AbsenceStatus.ACTIVE, "SICK_NOTE", 1L);;
+        final AbsencePeriod.RecordMorningSick morning = new AbsencePeriod.RecordMorningSick(other, 1L, AbsencePeriod.AbsenceStatus.ACTIVE, "SICK_NOTE", 1L);
         final AbsencePeriod.RecordNoonSick noon = new AbsencePeriod.RecordNoonSick(other, 1L, AbsencePeriod.AbsenceStatus.ACTIVE, "SICK_NOTE", 1L);
         final AbsencePeriod.Record record = new AbsencePeriod.Record(LocalDate.now(clock), other, morning, noon);
         final AbsencePeriod absencePeriodVacation = new AbsencePeriod(List.of(record));
@@ -4129,7 +4129,7 @@ class AbsenceOverviewViewControllerTest {
         final AbsencePeriod.RecordNoonVacation vacationNoon = new AbsencePeriod.RecordNoonVacation(other, 1L, AbsencePeriod.AbsenceStatus.ALLOWED, "Erholungsurlaub", 1L, false);
         final AbsencePeriod.Record vacationRecord = new AbsencePeriod.Record(LocalDate.now(clock), other, null, vacationNoon);
 
-        final AbsencePeriod.RecordMorningSick sickNoteMorning = new AbsencePeriod.RecordMorningSick(other, 1L, AbsencePeriod.AbsenceStatus.ACTIVE, "SICK_NOTE", 1L);;
+        final AbsencePeriod.RecordMorningSick sickNoteMorning = new AbsencePeriod.RecordMorningSick(other, 1L, AbsencePeriod.AbsenceStatus.ACTIVE, "SICK_NOTE", 1L);
         final AbsencePeriod.Record sickNoteRecord = new AbsencePeriod.Record(LocalDate.now(clock), other, sickNoteMorning, null);
 
         final AbsencePeriod absencePeriodVacation = new AbsencePeriod(List.of(vacationRecord, sickNoteRecord));
@@ -4351,7 +4351,7 @@ class AbsenceOverviewViewControllerTest {
         final AbsencePeriod.RecordNoonVacation vacationNoon = new AbsencePeriod.RecordNoonVacation(other, 1L, AbsencePeriod.AbsenceStatus.ALLOWED, "Erholungsurlaub", 1L, true);
         final AbsencePeriod.Record vacationRecord = new AbsencePeriod.Record(LocalDate.now(clock), other, null, vacationNoon);
 
-        final AbsencePeriod.RecordMorningSick sickNoteMorning = new AbsencePeriod.RecordMorningSick(other, 1L, AbsencePeriod.AbsenceStatus.ACTIVE, "SICK_NOTE", 1L);;
+        final AbsencePeriod.RecordMorningSick sickNoteMorning = new AbsencePeriod.RecordMorningSick(other, 1L, AbsencePeriod.AbsenceStatus.ACTIVE, "SICK_NOTE", 1L);
         final AbsencePeriod.Record sickNoteRecord = new AbsencePeriod.Record(LocalDate.now(clock), other, sickNoteMorning, null);
 
         final AbsencePeriod absencePeriodVacation = new AbsencePeriod(List.of(vacationRecord, sickNoteRecord));
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/account/VacationDaysServiceTest.java b/src/test/java/org/synyx/urlaubsverwaltung/account/VacationDaysServiceTest.java
index eeaefea4c..c3c6584a9 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/account/VacationDaysServiceTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/account/VacationDaysServiceTest.java
@@ -478,9 +478,9 @@ class VacationDaysServiceTest {
 
         assertThat(actual).hasSize(1);
         assertThat(actual.get(account)).satisfies(holidayAccountVacationDays -> {
-            assertThat(holidayAccountVacationDays.getAccount()).isEqualTo(account);
-            assertThat(holidayAccountVacationDays.getVacationDaysYear()).isEqualTo(expectedDaysLeft);
-            assertThat(holidayAccountVacationDays.getVacationDaysDateRange()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.account()).isEqualTo(account);
+            assertThat(holidayAccountVacationDays.vacationDaysYear()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.vacationDaysDateRange()).isEqualTo(expectedDaysLeft);
         });
     }
 
@@ -522,9 +522,9 @@ class VacationDaysServiceTest {
 
         assertThat(actual).hasSize(1);
         assertThat(actual.get(account)).satisfies(holidayAccountVacationDays -> {
-            assertThat(holidayAccountVacationDays.getAccount()).isEqualTo(account);
-            assertThat(holidayAccountVacationDays.getVacationDaysYear()).isEqualTo(expectedDaysLeft);
-            assertThat(holidayAccountVacationDays.getVacationDaysDateRange()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.account()).isEqualTo(account);
+            assertThat(holidayAccountVacationDays.vacationDaysYear()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.vacationDaysDateRange()).isEqualTo(expectedDaysLeft);
         });
     }
 
@@ -566,9 +566,9 @@ class VacationDaysServiceTest {
 
         assertThat(actual).hasSize(1);
         assertThat(actual.get(account)).satisfies(holidayAccountVacationDays -> {
-            assertThat(holidayAccountVacationDays.getAccount()).isEqualTo(account);
-            assertThat(holidayAccountVacationDays.getVacationDaysYear()).isEqualTo(expectedDaysLeft);
-            assertThat(holidayAccountVacationDays.getVacationDaysDateRange()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.account()).isEqualTo(account);
+            assertThat(holidayAccountVacationDays.vacationDaysYear()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.vacationDaysDateRange()).isEqualTo(expectedDaysLeft);
         });
     }
 
@@ -610,9 +610,9 @@ class VacationDaysServiceTest {
 
         assertThat(actual).hasSize(1);
         assertThat(actual.get(account)).satisfies(holidayAccountVacationDays -> {
-            assertThat(holidayAccountVacationDays.getAccount()).isEqualTo(account);
-            assertThat(holidayAccountVacationDays.getVacationDaysYear()).isEqualTo(expectedDaysLeft);
-            assertThat(holidayAccountVacationDays.getVacationDaysDateRange()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.account()).isEqualTo(account);
+            assertThat(holidayAccountVacationDays.vacationDaysYear()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.vacationDaysDateRange()).isEqualTo(expectedDaysLeft);
         });
     }
 
@@ -654,9 +654,9 @@ class VacationDaysServiceTest {
 
         assertThat(actual).hasSize(1);
         assertThat(actual.get(account)).satisfies(holidayAccountVacationDays -> {
-            assertThat(holidayAccountVacationDays.getAccount()).isEqualTo(account);
-            assertThat(holidayAccountVacationDays.getVacationDaysYear()).isEqualTo(expectedDaysLeft);
-            assertThat(holidayAccountVacationDays.getVacationDaysDateRange()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.account()).isEqualTo(account);
+            assertThat(holidayAccountVacationDays.vacationDaysYear()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.vacationDaysDateRange()).isEqualTo(expectedDaysLeft);
         });
     }
 
@@ -698,9 +698,9 @@ class VacationDaysServiceTest {
 
         assertThat(actual).hasSize(1);
         assertThat(actual.get(account)).satisfies(holidayAccountVacationDays -> {
-            assertThat(holidayAccountVacationDays.getAccount()).isEqualTo(account);
-            assertThat(holidayAccountVacationDays.getVacationDaysYear()).isEqualTo(expectedDaysLeft);
-            assertThat(holidayAccountVacationDays.getVacationDaysDateRange()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.account()).isEqualTo(account);
+            assertThat(holidayAccountVacationDays.vacationDaysYear()).isEqualTo(expectedDaysLeft);
+            assertThat(holidayAccountVacationDays.vacationDaysDateRange()).isEqualTo(expectedDaysLeft);
         });
     }
 
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/application/application/ApplicationInteractionServiceImplTest.java b/src/test/java/org/synyx/urlaubsverwaltung/application/application/ApplicationInteractionServiceImplTest.java
index 02170b8a4..fed065bd3 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/application/application/ApplicationInteractionServiceImplTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/application/application/ApplicationInteractionServiceImplTest.java
@@ -136,9 +136,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationAppliedEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationAppliedEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationAppliedEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -273,9 +273,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationAllowedEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationAllowedEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationAllowedEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -376,9 +376,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationAllowedEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationAllowedEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationAllowedEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -527,9 +527,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationAllowedTemporarilyEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationAllowedTemporarilyEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationAllowedTemporarilyEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -613,9 +613,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationAllowedEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationAllowedEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationAllowedEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -706,9 +706,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationAllowedEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationAllowedEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationAllowedEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -874,9 +874,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationRejectedEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationRejectedEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationRejectedEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -949,9 +949,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationRevokedEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationRevokedEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationRevokedEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -1001,9 +1001,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationCancellationRequestedEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationCancellationRequestedEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationCancellationRequestedEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -1035,9 +1035,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationCancelledEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationCancelledEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationCancelledEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -1192,9 +1192,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationCancelledEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationCancelledEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationCancelledEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -1263,9 +1263,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationDeclinedCancellationRequestEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationDeclinedCancellationRequestEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationDeclinedCancellationRequestEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -1321,9 +1321,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationCreatedFromSickNoteEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationCreatedFromSickNoteEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationCreatedFromSickNoteEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(applicationForLeave);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     // REMIND ----------------------------------------------------------------------------------------------------------
@@ -1438,9 +1438,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationUpdatedEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationUpdatedEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationUpdatedEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(editedApplication);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(editedApplication);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     @Test
@@ -1666,9 +1666,9 @@ class ApplicationInteractionServiceImplTest {
         ArgumentCaptor<ApplicationDeletedEvent> argumentCaptor = ArgumentCaptor.forClass(ApplicationDeletedEvent.class);
         verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
         final ApplicationDeletedEvent event = argumentCaptor.getValue();
-        assertThat(event.getApplication()).isEqualTo(application);
-        assertThat(event.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(event.getId()).isNotNull();
+        assertThat(event.application()).isEqualTo(application);
+        assertThat(event.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(event.id()).isNotNull();
     }
 
     private void assertApplicationForLeaveHasChangedStatus(Application applicationForLeave, ApplicationStatus status,
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/person/PersonServiceIT.java b/src/test/java/org/synyx/urlaubsverwaltung/person/PersonServiceIT.java
index ab6528c1f..4923740bf 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 TestContainersBase {
 
         assertThat(personRepository.existsById(personId)).isTrue();
         assertThat(personRepository.findByUsernameIgnoreCase("user").get().getPermissions()).containsExactly(USER);
-        assertThat(personBasedataService.getBasedataByPersonId(personId).get().getPersonId().getValue()).isEqualTo(personId);
+        assertThat(personBasedataService.getBasedataByPersonId(personId).get().getPersonId().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/PersonServiceImplTest.java b/src/test/java/org/synyx/urlaubsverwaltung/person/PersonServiceImplTest.java
index b8898d98d..15497dfdf 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/person/PersonServiceImplTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/person/PersonServiceImplTest.java
@@ -404,7 +404,7 @@ class PersonServiceImplTest {
 
         inOrder.verify(personRepository).existsById(42L);
         inOrder.verify(applicationEventPublisher).publishEvent(personDeletedEventArgumentCaptor.capture());
-        assertThat(personDeletedEventArgumentCaptor.getValue().getPerson())
+        assertThat(personDeletedEventArgumentCaptor.getValue().person())
             .isEqualTo(person);
 
         inOrder.verify(accountInteractionService).deleteAllByPerson(person);
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidaysServiceImplTest.java b/src/test/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidaysServiceImplTest.java
index 9d2949c60..5b8cbd227 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidaysServiceImplTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidaysServiceImplTest.java
@@ -162,7 +162,7 @@ class PublicHolidaysServiceImplTest {
         when(settingsService.getSettings()).thenReturn(new Settings());
 
         final Optional<PublicHoliday> maybePublicHoliday = sut.getPublicHoliday(of(2019, MAY, 30), GERMANY_BADEN_WUERTTEMBERG);
-        assertThat(maybePublicHoliday).hasValueSatisfying(publicHoliday -> assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.FULL));
+        assertThat(maybePublicHoliday).hasValueSatisfying(publicHoliday -> assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.FULL));
     }
 
     @Test
@@ -171,7 +171,7 @@ class PublicHolidaysServiceImplTest {
         when(settingsService.getSettings()).thenReturn(new Settings());
 
         final Optional<PublicHoliday> maybePublicHoliday = sut.getPublicHoliday(of(2019, AUGUST, 15), GERMANY_BAYERN_MUENCHEN);
-        assertThat(maybePublicHoliday).hasValueSatisfying(publicHoliday -> assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.FULL));
+        assertThat(maybePublicHoliday).hasValueSatisfying(publicHoliday -> assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.FULL));
     }
 
     @Test
@@ -198,7 +198,7 @@ class PublicHolidaysServiceImplTest {
         when(settingsService.getSettings()).thenReturn(new Settings());
 
         final Optional<PublicHoliday> maybePublicHoliday = sut.getPublicHoliday(of(2019, DECEMBER, 24), GERMANY_BADEN_WUERTTEMBERG);
-        assertThat(maybePublicHoliday).hasValueSatisfying(publicHoliday -> assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.NOON));
+        assertThat(maybePublicHoliday).hasValueSatisfying(publicHoliday -> assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.NOON));
     }
 
     @Test
@@ -207,7 +207,7 @@ class PublicHolidaysServiceImplTest {
         when(settingsService.getSettings()).thenReturn(new Settings());
 
         final Optional<PublicHoliday> maybePublicHoliday = sut.getPublicHoliday(of(2019, DECEMBER, 31), GERMANY_BADEN_WUERTTEMBERG);
-        assertThat(maybePublicHoliday).hasValueSatisfying(publicHoliday -> assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.NOON));
+        assertThat(maybePublicHoliday).hasValueSatisfying(publicHoliday -> assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.NOON));
     }
 
     @Test
@@ -218,7 +218,7 @@ class PublicHolidaysServiceImplTest {
         final List<PublicHoliday> publicHolidays = sut.getPublicHolidays(of(2019, DECEMBER, 30), of(2019, DECEMBER, 31), GERMANY_BADEN_WUERTTEMBERG);
         assertThat(publicHolidays)
             .hasSize(1)
-            .extracting(p -> p.getDayLength()).containsExactly(DayLength.NOON);
+            .extracting(p -> p.dayLength()).containsExactly(DayLength.NOON);
     }
 
     // CHRISTMAS EVE
@@ -236,8 +236,8 @@ class PublicHolidaysServiceImplTest {
 
         assertThat(actual).isPresent();
         assertThat(actual.get()).satisfies(publicHoliday -> {
-            assertThat(publicHoliday.getDate()).isEqualTo(christmasEveDate);
-            assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.NOON);
+            assertThat(publicHoliday.date()).isEqualTo(christmasEveDate);
+            assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.NOON);
         });
     }
 
@@ -253,8 +253,8 @@ class PublicHolidaysServiceImplTest {
 
         assertThat(actual).isPresent();
         assertThat(actual.get()).satisfies(publicHoliday -> {
-            assertThat(publicHoliday.getDate()).isEqualTo(christmasEveDate);
-            assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.MORNING);
+            assertThat(publicHoliday.date()).isEqualTo(christmasEveDate);
+            assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.MORNING);
         });
     }
 
@@ -270,8 +270,8 @@ class PublicHolidaysServiceImplTest {
 
         assertThat(actual).isPresent();
         assertThat(actual.get()).satisfies(publicHoliday -> {
-            assertThat(publicHoliday.getDate()).isEqualTo(christmasEveDate);
-            assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.ZERO);
+            assertThat(publicHoliday.date()).isEqualTo(christmasEveDate);
+            assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.ZERO);
         });
     }
 
@@ -287,8 +287,8 @@ class PublicHolidaysServiceImplTest {
 
         assertThat(actual).isPresent();
         assertThat(actual.get()).satisfies(publicHoliday -> {
-            assertThat(publicHoliday.getDate()).isEqualTo(christmasEveDate);
-            assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.FULL);
+            assertThat(publicHoliday.date()).isEqualTo(christmasEveDate);
+            assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.FULL);
         });
     }
 
@@ -307,8 +307,8 @@ class PublicHolidaysServiceImplTest {
 
         assertThat(actual).isPresent();
         assertThat(actual.get()).satisfies(publicHoliday -> {
-            assertThat(publicHoliday.getDate()).isEqualTo(newYearsEveDate);
-            assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.NOON);
+            assertThat(publicHoliday.date()).isEqualTo(newYearsEveDate);
+            assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.NOON);
         });
     }
 
@@ -324,8 +324,8 @@ class PublicHolidaysServiceImplTest {
 
         assertThat(actual).isPresent();
         assertThat(actual.get()).satisfies(publicHoliday -> {
-            assertThat(publicHoliday.getDate()).isEqualTo(newYearsEveDate);
-            assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.MORNING);
+            assertThat(publicHoliday.date()).isEqualTo(newYearsEveDate);
+            assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.MORNING);
         });
     }
 
@@ -341,8 +341,8 @@ class PublicHolidaysServiceImplTest {
 
         assertThat(actual).isPresent();
         assertThat(actual.get()).satisfies(publicHoliday -> {
-            assertThat(publicHoliday.getDate()).isEqualTo(newYearsEveDate);
-            assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.ZERO);
+            assertThat(publicHoliday.date()).isEqualTo(newYearsEveDate);
+            assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.ZERO);
         });
     }
 
@@ -358,8 +358,8 @@ class PublicHolidaysServiceImplTest {
 
         assertThat(actual).isPresent();
         assertThat(actual.get()).satisfies(publicHoliday -> {
-            assertThat(publicHoliday.getDate()).isEqualTo(newYearsEveDate);
-            assertThat(publicHoliday.getDayLength()).isEqualTo(DayLength.FULL);
+            assertThat(publicHoliday.date()).isEqualTo(newYearsEveDate);
+            assertThat(publicHoliday.dayLength()).isEqualTo(DayLength.FULL);
         });
     }
 
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/settings/SettingsWorkingTimeViewControllerTest.java b/src/test/java/org/synyx/urlaubsverwaltung/settings/SettingsWorkingTimeViewControllerTest.java
index 79633eb52..5d03ae279 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/settings/SettingsWorkingTimeViewControllerTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/settings/SettingsWorkingTimeViewControllerTest.java
@@ -124,7 +124,7 @@ class SettingsWorkingTimeViewControllerTest {
         )
             .andExpect(status().is3xxRedirection())
             .andExpect(redirectedUrl("/web/settings/working-time"))
-            .andExpect(flash().attribute("success", true));;
+            .andExpect(flash().attribute("success", true));
 
         final ArgumentCaptor<Settings> captor = ArgumentCaptor.forClass(Settings.class);
         verify(settingsService).save(captor.capture());
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteInteractionServiceImplTest.java b/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteInteractionServiceImplTest.java
index 68ed8a3ab..7af3ae6e5 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteInteractionServiceImplTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/sicknote/sicknote/SickNoteInteractionServiceImplTest.java
@@ -102,9 +102,9 @@ class SickNoteInteractionServiceImplTest {
         final ArgumentCaptor<SickNoteCreatedEvent> eventCaptor = ArgumentCaptor.forClass(SickNoteCreatedEvent.class);
         verify(applicationEventPublisher).publishEvent(eventCaptor.capture());
         final SickNoteCreatedEvent sickNoteCreatedEvent = eventCaptor.getValue();
-        assertThat(sickNoteCreatedEvent.getSickNote()).isEqualTo(createdSickNote);
-        assertThat(sickNoteCreatedEvent.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(sickNoteCreatedEvent.getId()).isNotNull();
+        assertThat(sickNoteCreatedEvent.sickNote()).isEqualTo(createdSickNote);
+        assertThat(sickNoteCreatedEvent.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(sickNoteCreatedEvent.id()).isNotNull();
     }
 
     @Test
@@ -221,9 +221,9 @@ class SickNoteInteractionServiceImplTest {
         final ArgumentCaptor<SickNoteUpdatedEvent> eventCaptor = ArgumentCaptor.forClass(SickNoteUpdatedEvent.class);
         verify(applicationEventPublisher).publishEvent(eventCaptor.capture());
         final SickNoteUpdatedEvent sickNoteUpdatedEvent = eventCaptor.getValue();
-        assertThat(sickNoteUpdatedEvent.getSickNote()).isEqualTo(sickNote);
-        assertThat(sickNoteUpdatedEvent.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(sickNoteUpdatedEvent.getId()).isNotNull();
+        assertThat(sickNoteUpdatedEvent.sickNote()).isEqualTo(sickNote);
+        assertThat(sickNoteUpdatedEvent.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(sickNoteUpdatedEvent.id()).isNotNull();
 
         verify(sickNoteMailService).sendEditedToSickPerson(sickNote);
     }
@@ -261,9 +261,9 @@ class SickNoteInteractionServiceImplTest {
         final ArgumentCaptor<SickNoteCancelledEvent> eventCaptor = ArgumentCaptor.forClass(SickNoteCancelledEvent.class);
         verify(applicationEventPublisher).publishEvent(eventCaptor.capture());
         final SickNoteCancelledEvent sickNoteCancelledEvent = eventCaptor.getValue();
-        assertThat(sickNoteCancelledEvent.getSickNote()).isEqualTo(cancelledSickNote);
-        assertThat(sickNoteCancelledEvent.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(sickNoteCancelledEvent.getId()).isNotNull();
+        assertThat(sickNoteCancelledEvent.sickNote()).isEqualTo(cancelledSickNote);
+        assertThat(sickNoteCancelledEvent.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(sickNoteCancelledEvent.id()).isNotNull();
     }
 
     @Test
@@ -357,10 +357,10 @@ class SickNoteInteractionServiceImplTest {
         final ArgumentCaptor<SickNoteToApplicationConvertedEvent> eventCaptor = ArgumentCaptor.forClass(SickNoteToApplicationConvertedEvent.class);
         verify(applicationEventPublisher).publishEvent(eventCaptor.capture());
         final SickNoteToApplicationConvertedEvent sickNoteToApplicationConvertedEvent = eventCaptor.getValue();
-        assertThat(sickNoteToApplicationConvertedEvent.getSickNote()).isEqualTo(convertedSickNote);
-        assertThat(sickNoteToApplicationConvertedEvent.getApplication()).isEqualTo(applicationForLeave);
-        assertThat(sickNoteToApplicationConvertedEvent.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(sickNoteToApplicationConvertedEvent.getId()).isNotNull();
+        assertThat(sickNoteToApplicationConvertedEvent.sickNote()).isEqualTo(convertedSickNote);
+        assertThat(sickNoteToApplicationConvertedEvent.application()).isEqualTo(applicationForLeave);
+        assertThat(sickNoteToApplicationConvertedEvent.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(sickNoteToApplicationConvertedEvent.id()).isNotNull();
     }
 
     @Test
@@ -449,8 +449,8 @@ class SickNoteInteractionServiceImplTest {
         final ArgumentCaptor<SickNoteDeletedEvent> eventCaptor = ArgumentCaptor.forClass(SickNoteDeletedEvent.class);
         verify(applicationEventPublisher).publishEvent(eventCaptor.capture());
         final SickNoteDeletedEvent sickNoteDeletedEvent = eventCaptor.getValue();
-        assertThat(sickNoteDeletedEvent.getSickNote()).isEqualTo(sickNote);
-        assertThat(sickNoteDeletedEvent.getCreatedAt()).isBeforeOrEqualTo(Instant.now());
-        assertThat(sickNoteDeletedEvent.getId()).isNotNull();
+        assertThat(sickNoteDeletedEvent.sickNote()).isEqualTo(sickNote);
+        assertThat(sickNoteDeletedEvent.createdAt()).isBeforeOrEqualTo(Instant.now());
+        assertThat(sickNoteDeletedEvent.id()).isNotNull();
     }
 }
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeServiceImplTest.java b/src/test/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeServiceImplTest.java
index b80b96c5e..e2a72c417 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeServiceImplTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/workingtime/WorkingTimeServiceImplTest.java
@@ -351,8 +351,8 @@ class WorkingTimeServiceImplTest {
             .isNotEmpty()
             .hasSize(2)
             .containsExactly(
-                entry(new DateRange(LocalDate.of(2021, 11, 15), LocalDate.of(2021, 11, 30)), GERMANY_RHEINLAND_PFALZ),
-                entry(new DateRange(LocalDate.of(2021, 11, 1), LocalDate.of(2021, 11, 14)), GERMANY_BADEN_WUERTTEMBERG)
+                entry(new DateRange(LocalDate.of(2021, 11, 1), LocalDate.of(2021, 11, 14)), GERMANY_BADEN_WUERTTEMBERG),
+                entry(new DateRange(LocalDate.of(2021, 11, 15), LocalDate.of(2021, 11, 30)), GERMANY_RHEINLAND_PFALZ)
             );
     }
 
@@ -469,8 +469,8 @@ class WorkingTimeServiceImplTest {
             .isNotEmpty()
             .hasSize(2)
             .containsExactly(
-                entry(new DateRange(LocalDate.of(2021, 11, 15), LocalDate.of(2021, 11, 30)), new WorkingTime(person, LocalDate.of(2021, 11, 15), GERMANY_RHEINLAND_PFALZ, false)),
-                entry(new DateRange(LocalDate.of(2021, 11, 1), LocalDate.of(2021, 11, 14)), new WorkingTime(person, LocalDate.of(2020, 9, 1), GERMANY_BADEN_WUERTTEMBERG, false))
+                entry(new DateRange(LocalDate.of(2021, 11, 1), LocalDate.of(2021, 11, 14)), new WorkingTime(person, LocalDate.of(2020, 9, 1), GERMANY_BADEN_WUERTTEMBERG, false)),
+                entry(new DateRange(LocalDate.of(2021, 11, 15), LocalDate.of(2021, 11, 30)), new WorkingTime(person, LocalDate.of(2021, 11, 15), GERMANY_RHEINLAND_PFALZ, false))
             );
     }