[JAVA-28828] Fix spring-boot-3-2 build and integration tests (#16038)

This commit is contained in:
sam-gardner
2024-03-15 08:45:46 +01:00
committed by GitHub
parent 2c8e998cfd
commit 2a16dc158c
3 changed files with 10 additions and 3 deletions
@@ -15,12 +15,14 @@ import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpStatusCode;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.TestPropertySource;
import org.springframework.web.client.RestClient;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@TestPropertySource(locations="classpath:connectiondetails/application-r2dbc.properties")
public class RestClientIntegrationTest {
@LocalServerPort
@@ -110,7 +112,7 @@ public class RestClientIntegrationTest {
.uri(uriBase + "/articles/1234")
.retrieve()
.onStatus(status -> status.value() == 404, (request, response) -> { throw new ArticleNotFoundException(); })
.body(new ParameterizedTypeReference<>() {});
.body(new ParameterizedTypeReference<String>() {});
}).isInstanceOf(ArticleNotFoundException.class);
}