To test https://github.com/spring-projects/spring-boot/pull/36118 we need to be able to exclude the JDK's java.net.http.HttpClient class in tests. Such an exclusion would simulate running on a JVM that does not include the java.net.http module. We can approximate this well enough for testing purposes by excluding the java.net.http package:

@ClassPathExclusions(packages = "java.net.http")