File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 36
36
import org .springframework .context .annotation .Configuration ;
37
37
import org .springframework .mock .web .MockServletContext ;
38
38
import org .springframework .test .web .servlet .MockMvc ;
39
+ import org .springframework .test .web .servlet .setup .MockMvcBuilders ;
39
40
import org .springframework .web .context .support .AnnotationConfigWebApplicationContext ;
40
41
41
42
import static org .hamcrest .CoreMatchers .containsString ;
42
43
import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .get ;
43
44
import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .content ;
44
45
import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .status ;
45
- import static org .springframework .test .web .servlet .setup .MockMvcBuilders .webAppContextSetup ;
46
46
47
47
/**
48
48
* Integration tests for the health endpoint when Spring Security is not available.
@@ -66,7 +66,7 @@ public void healthDetailIsPresent() throws Exception {
66
66
this .context .setServletContext (new MockServletContext ());
67
67
this .context .register (TestConfiguration .class );
68
68
this .context .refresh ();
69
- MockMvc mockMvc = webAppContextSetup (this .context ).build ();
69
+ MockMvc mockMvc = MockMvcBuilders . webAppContextSetup (this .context ).build ();
70
70
mockMvc .perform (get ("/health" )).andExpect (status ().isOk ())
71
71
.andExpect (content ().string (containsString ("\" hello\" :\" world\" " )));
72
72
}
You can’t perform that action at this time.
0 commit comments