diff --git a/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java b/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java index 578c829540..3d01b40eda 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java @@ -102,7 +102,7 @@ public class MBeanExporterTests extends AbstractMBeanServerTests { exporter.setNotificationListenerMappings(listeners); assertThatExceptionOfType(MBeanExportException.class).as("NotificationListener on a non-existent MBean").isThrownBy(() -> start(exporter)) - .satisfies(ex -> assertThat(ex.contains(InstanceNotFoundException.class))); + .satisfies(ex -> assertThat(ex.contains(InstanceNotFoundException.class)).isTrue()); } @Test diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/event/JUnitJupiterApplicationEventsIntegrationTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/event/JUnitJupiterApplicationEventsIntegrationTests.java index 800d45c94d..ae1d30eeed 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/event/JUnitJupiterApplicationEventsIntegrationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/event/JUnitJupiterApplicationEventsIntegrationTests.java @@ -264,10 +264,10 @@ class JUnitJupiterApplicationEventsIntegrationTests { context.publishEvent(new CustomEvent("sync")); Awaitility.await().atMost(Durations.ONE_SECOND) - .untilAsserted(() -> assertThat(assertThat(this.applicationEvents.stream(CustomEvent.class)) + .untilAsserted(() -> assertThat(this.applicationEvents.stream(CustomEvent.class)) .singleElement() .extracting(CustomEvent::getMessage, InstanceOfAssertFactories.STRING) - .isEqualTo("sync"))); + .isEqualTo("sync")); } } diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/event/JUnit4ApplicationEventsAsyncIntegrationTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/event/JUnit4ApplicationEventsAsyncIntegrationTests.java index 2922671e2f..3c60c2db6f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/event/JUnit4ApplicationEventsAsyncIntegrationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/event/JUnit4ApplicationEventsAsyncIntegrationTests.java @@ -71,10 +71,10 @@ public class JUnit4ApplicationEventsAsyncIntegrationTests { context.publishEvent(new CustomEvent("sync")); Awaitility.await().atMost(Durations.ONE_SECOND) - .untilAsserted(() -> assertThat(assertThat(this.applicationEvents.stream(CustomEvent.class)) + .untilAsserted(() -> assertThat(this.applicationEvents.stream(CustomEvent.class)) .singleElement() .extracting(CustomEvent::getMessage, InstanceOfAssertFactories.STRING) - .isEqualTo("sync"))); + .isEqualTo("sync")); } diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/event/TestNGApplicationEventsAsyncIntegrationTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/event/TestNGApplicationEventsAsyncIntegrationTests.java index 3d2eb0171e..140fbe0f88 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/event/TestNGApplicationEventsAsyncIntegrationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/event/TestNGApplicationEventsAsyncIntegrationTests.java @@ -65,10 +65,10 @@ class TestNGApplicationEventsAsyncIntegrationTests extends AbstractTestNGSpringC context.publishEvent(new CustomEvent("asyncConsumption")); Awaitility.await().atMost(Durations.ONE_SECOND) - .untilAsserted(() -> assertThat(assertThat(this.applicationEvents.stream(CustomEvent.class)) + .untilAsserted(() -> assertThat(this.applicationEvents.stream(CustomEvent.class)) .singleElement() .extracting(CustomEvent::getMessage, InstanceOfAssertFactories.STRING) - .isEqualTo("asyncConsumption"))); + .isEqualTo("asyncConsumption")); }