From d095a5e47da1ed3fbb4a0ee886156c5517c08630 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Tue, 31 Oct 2023 09:21:54 +0100 Subject: [PATCH] Polish RestartApplicationListenerTests --- .../boot/devtools/restart/RestartApplicationListenerTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestartApplicationListenerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestartApplicationListenerTests.java index 9e0d0f82092..23468ef6dd4 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestartApplicationListenerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestartApplicationListenerTests.java @@ -36,7 +36,6 @@ import org.springframework.core.Ordered; import org.springframework.test.util.ReflectionTestUtils; import static org.assertj.core.api.Assertions.assertThat; -import static org.hamcrest.Matchers.nullValue; import static org.mockito.Mockito.mock; /** @@ -117,7 +116,7 @@ class RestartApplicationListenerTests { SpringApplication application = new SpringApplication(); ConfigurableApplicationContext context = mock(ConfigurableApplicationContext.class); listener.onApplicationEvent(new ApplicationStartingEvent(bootstrapContext, application, ARGS)); - assertThat(Restarter.getInstance()).isNotEqualTo(nullValue()); + assertThat(Restarter.getInstance()).isNotNull(); assertThat(Restarter.getInstance().isFinished()).isFalse(); listener.onApplicationEvent(new ApplicationPreparedEvent(application, ARGS, context)); if (failed) {