diff --git a/spring-boot-modules/spring-boot-4/pom.xml b/spring-boot-modules/spring-boot-4/pom.xml
index 1fa59f2fb97e..2ca2a97240a9 100644
--- a/spring-boot-modules/spring-boot-4/pom.xml
+++ b/spring-boot-modules/spring-boot-4/pom.xml
@@ -42,6 +42,7 @@
org.projectlombok
lombok
true
+ provided
org.mapstruct
@@ -145,6 +146,10 @@
org.apache.maven.plugins
maven-compiler-plugin
+
+ 21
+ 21
+
diff --git a/spring-boot-modules/spring-boot-4/src/test/java/com/baeldung/spring/resttestclient/RestTestClientTest.java b/spring-boot-modules/spring-boot-4/src/test/java/com/baeldung/spring/resttestclient/RestTestClientTest.java
new file mode 100644
index 000000000000..5e36a367875a
--- /dev/null
+++ b/spring-boot-modules/spring-boot-4/src/test/java/com/baeldung/spring/resttestclient/RestTestClientTest.java
@@ -0,0 +1,26 @@
+package com.baeldung.spring.resttestclient;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.http.MediaType;
+import org.springframework.test.web.servlet.client.RestTestClient;
+
+public class RestTestClientTest {
+
+ RestTestClient client = RestTestClient.bindToServer()
+ .baseUrl("http://localhost:8080")
+ .build();
+
+ @Test
+ void should() {
+ System.out.println("Foo");
+
+ client.get()
+ .uri("/persons/1")
+ .accept(MediaType.APPLICATION_JSON)
+ .exchange()
+ .expectStatus()
+ .isOk()
+ .expectHeader()
+ .contentType(MediaType.APPLICATION_JSON);
+ }
+}