diff --git a/src/test/java/de/focusshift/zeiterfassung/absence/AbsenceTypeIT.java b/src/test/java/de/focusshift/zeiterfassung/absence/AbsenceTypeIT.java index c250a996a..8368866ee 100644 --- a/src/test/java/de/focusshift/zeiterfassung/absence/AbsenceTypeIT.java +++ b/src/test/java/de/focusshift/zeiterfassung/absence/AbsenceTypeIT.java @@ -53,7 +53,7 @@ class AbsenceTypeIT extends TestContainersBase { @Test void ensureAbsenceTypeCreation() { - TenantId tenantId = new TenantId("default"); + final TenantId tenantId = new TenantId("default"); when(tenantContextHolder.getCurrentTenantId()).thenReturn(Optional.of(tenantId)); rabbitTemplate.convertAndSend("vacationtype.topic", "updated", VacationTypeUpdatedEventDTO.builder() @@ -90,7 +90,7 @@ void ensureAbsenceTypeCreation() { }); }); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(tenantId); inOrder.verify(tenantContextHolder).clear(); diff --git a/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/application/ApplicationEventHandlerRabbitmqTest.java b/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/application/ApplicationEventHandlerRabbitmqTest.java index d5fa886f9..9b8d7602e 100644 --- a/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/application/ApplicationEventHandlerRabbitmqTest.java +++ b/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/application/ApplicationEventHandlerRabbitmqTest.java @@ -50,7 +50,7 @@ void setUp() { @Test void onApplicationAllowedEvent() { - TenantId tenantId = new TenantId("tenantId"); + final TenantId tenantId = new TenantId("tenantId"); final ApplicationAllowedEventDTO event = ApplicationAllowedEventDTO.builder() .id(UUID.randomUUID()) @@ -77,14 +77,14 @@ void onApplicationAllowedEvent() { ); verify(absenceWriteService).addAbsence(absence); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(tenantId); inOrder.verify(tenantContextHolder).clear(); } @Test void onApplicationCreatedFromSickNoteEvent() { - TenantId tenantId = new TenantId("tenantId"); + final TenantId tenantId = new TenantId("tenantId"); final ApplicationCreatedFromSickNoteEventDTO event = ApplicationCreatedFromSickNoteEventDTO.builder() .id(UUID.randomUUID()) @@ -110,14 +110,14 @@ void onApplicationCreatedFromSickNoteEvent() { ); verify(absenceWriteService).addAbsence(absence); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(tenantId); inOrder.verify(tenantContextHolder).clear(); } @Test void onApplicationCancelledEvent() { - TenantId tenantId = new TenantId("tenantId"); + final TenantId tenantId = new TenantId("tenantId"); final ApplicationCancelledEventDTO event = ApplicationCancelledEventDTO.builder() .id(UUID.randomUUID()) @@ -143,14 +143,14 @@ void onApplicationCancelledEvent() { ); verify(absenceWriteService).deleteAbsence(absence); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(tenantId); inOrder.verify(tenantContextHolder).clear(); } @Test void onApplicationWithAbsentWorkingDays() { - TenantId tenantId = new TenantId("tenantId"); + final TenantId tenantId = new TenantId("tenantId"); final ApplicationAllowedEventDTO event = ApplicationAllowedEventDTO.builder() .id(UUID.randomUUID()) @@ -167,7 +167,7 @@ void onApplicationWithAbsentWorkingDays() { verifyNoInteractions(absenceWriteService); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(tenantId); inOrder.verify(tenantContextHolder).clear(); } diff --git a/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/sicknote/SickNoteEventHandlerRabbitmqIT.java b/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/sicknote/SickNoteEventHandlerRabbitmqIT.java index e264bdcfd..f6df7ecac 100644 --- a/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/sicknote/SickNoteEventHandlerRabbitmqIT.java +++ b/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/sicknote/SickNoteEventHandlerRabbitmqIT.java @@ -99,7 +99,7 @@ void ensureSickNoteCreatedUpdatedDeleted() { final SickNotePersonDTO boss = SickNotePersonDTO.builder().personId(1L).username("boss").build(); - TenantId tenantId = new TenantId(TENANT_ID); + final TenantId tenantId = new TenantId(TENANT_ID); when(tenantContextHolder.getCurrentTenantId()).thenReturn(Optional.of(tenantId)); // CREATE sick note absence @@ -127,7 +127,7 @@ void ensureSickNoteCreatedUpdatedDeleted() { .hasSize(1) .containsOnly(Map.entry(now, List.of(expected))); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(tenantId); inOrder.verify(tenantContextHolder).clear(); }); @@ -153,7 +153,8 @@ void ensureSickNoteCreatedUpdatedDeleted() { assertThat(absences) .hasSize(2) .containsOnly(Map.entry(now, List.of(expected)), Map.entry(now.plusDays(1), List.of(expected))); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(tenantId); inOrder.verify(tenantContextHolder).clear(); }); @@ -178,7 +179,7 @@ void ensureSickNoteCreatedUpdatedDeleted() { .hasSize(1) .containsOnly(Map.entry(now, List.of())); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(tenantId); inOrder.verify(tenantContextHolder).clear(); }); @@ -195,7 +196,7 @@ void ensureConvertedToApplicationDeletesSickNote() { final SickNotePersonDTO boss = SickNotePersonDTO.builder().personId(1L).username("boss").build(); final UserId userId = new UserId("boss"); - TenantId tenantId = new TenantId(TENANT_ID); + final TenantId tenantId = new TenantId(TENANT_ID); when(tenantContextHolder.getCurrentTenantId()).thenReturn(Optional.of(tenantId)); final AbsenceWrite absence = new AbsenceWrite(1L, userId, startOfDay, startOfDay, FULL, SICK); @@ -222,7 +223,7 @@ void ensureConvertedToApplicationDeletesSickNote() { .containsOnly(Map.entry(now, List.of())); }); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(tenantId); inOrder.verify(tenantContextHolder).clear(); } diff --git a/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/vacationtype/VacationTypeHandlerRabbitmqTest.java b/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/vacationtype/VacationTypeHandlerRabbitmqTest.java index 61f70133f..340e31cfa 100644 --- a/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/vacationtype/VacationTypeHandlerRabbitmqTest.java +++ b/src/test/java/de/focusshift/zeiterfassung/integration/urlaubsverwaltung/vacationtype/VacationTypeHandlerRabbitmqTest.java @@ -57,7 +57,7 @@ void ensureAbsenceTypeUpdateIsIgnoredWhenCategoryCannotBeMapped() { sut.on(eventDto); verifyNoInteractions(absenceTypeService); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(TENANT_ID); inOrder.verify(tenantContextHolder).clear(); } @@ -77,7 +77,7 @@ void ensureAbsenceTypeUpdateIsIgnoredWhenColorCannotBeMapped() { sut.on(eventDto); verifyNoInteractions(absenceTypeService); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(TENANT_ID); inOrder.verify(tenantContextHolder).clear(); } @@ -113,7 +113,7 @@ void ensureAbsenceTypeUpdateImpl(AbsenceTypeCategory category, AbsenceColor colo labels )); - InOrder inOrder = Mockito.inOrder(tenantContextHolder); + final InOrder inOrder = Mockito.inOrder(tenantContextHolder); inOrder.verify(tenantContextHolder).setTenantId(TENANT_ID); inOrder.verify(tenantContextHolder).clear(); }