aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewModesNotificationsSenderTest.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewModesNotificationsSenderTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewModesNotificationsSenderTest.java
index 13306e2fd4a..233283c58e6 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewModesNotificationsSenderTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewModesNotificationsSenderTest.java
@@ -91,8 +91,10 @@ class NewModesNotificationsSenderTest {
verify(notificationManager, times(2)).scheduleForSending(captor.capture());
assertThat(captor.getAllValues())
- .filteredOn(notification -> notification instanceof QualityGateMetricsUpdateNotification)
- .map(notification -> (QualityGateMetricsUpdateNotification) notification)
+ .filteredOn(
+ QualityGateMetricsUpdateNotification.class::isInstance)
+ .map(
+ QualityGateMetricsUpdateNotification.class::cast)
.hasSize(1)
.extracting(QualityGateMetricsUpdateNotification::isMQRModeEnabled).isEqualTo(List.of(false));
}
@@ -109,8 +111,9 @@ class NewModesNotificationsSenderTest {
verify(notificationManager, times(1)).scheduleForSending(captor.capture());
assertThat(captor.getAllValues())
- .filteredOn(notification -> notification instanceof QualityGateMetricsUpdateNotification)
- .map(notification -> (QualityGateMetricsUpdateNotification) notification)
+ .filteredOn(
+ QualityGateMetricsUpdateNotification.class::isInstance)
+ .map(QualityGateMetricsUpdateNotification.class::cast)
.isEmpty();
}
}