From fc439ff99d9bef55dbd4f16c65f87bd523b47e4e Mon Sep 17 00:00:00 2001 From: Philippe Sevestre Date: Wed, 28 Feb 2024 23:41:04 -0300 Subject: [PATCH] [BAEL-7524] Revert bad merge --- .../quotes/QuotesApplicationIntegrationTest.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spring-boot-modules/spring-boot-openapi/src/test/java/com/baeldung/tutorials/openapi/quotes/QuotesApplicationIntegrationTest.java b/spring-boot-modules/spring-boot-openapi/src/test/java/com/baeldung/tutorials/openapi/quotes/QuotesApplicationIntegrationTest.java index 22a5a9cebe..b1defb99b1 100644 --- a/spring-boot-modules/spring-boot-openapi/src/test/java/com/baeldung/tutorials/openapi/quotes/QuotesApplicationIntegrationTest.java +++ b/spring-boot-modules/spring-boot-openapi/src/test/java/com/baeldung/tutorials/openapi/quotes/QuotesApplicationIntegrationTest.java @@ -11,6 +11,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.http.HttpEntity; +import org.springframework.http.HttpStatus; import com.baeldung.tutorials.openapi.quotes.api.model.QuoteResponse; @@ -23,6 +24,12 @@ class QuotesApplicationIntegrationTest { @Autowired private TestRestTemplate restTemplate; + @Test + void whenGetQuote_thenSuccess() { + var response = restTemplate.getForEntity("http://localhost:" + port + "/quotes/BAEL", QuoteResponse.class); + assertThat(response.getStatusCode()) + .isEqualTo(HttpStatus.OK); + } @Test void whenGetQuoteMultipleTimes_thenResponseCached() { @@ -34,10 +41,5 @@ class QuotesApplicationIntegrationTest { .collect(Collectors.groupingBy((q -> q.hashCode()), Collectors.counting())); assertThat(quotes.size()).isEqualTo(1); - - - } - - } \ No newline at end of file