JAVA-29231 Move modules inside existing container modules (#15492)

This commit is contained in:
anuragkumawat
2024-01-01 11:27:05 -08:00
committed by GitHub
parent 76bde3ff46
commit 2096eac575
209 changed files with 472 additions and 222 deletions
@@ -0,0 +1,35 @@
package com.baeldung;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@SpringBootTest
class JmeterIntegrationTest {
MockMvc mvc;
public JmeterIntegrationTest(WebApplicationContext wac) {
this.mvc = MockMvcBuilders.webAppContextSetup(wac).build();
}
@Test
void whenCallingUUIDController_thenWeShouldRecieveRandomizedResponse() throws Exception {
MockHttpServletResponse response = mvc.perform(get("/api/uuid"))
.andDo(print())
.andExpect(status().isOk())
.andReturn()
.getResponse();
assertThat(response.getContentAsString())
.contains("Test message...");
}
}