Polish RandomPortTests

This commit is contained in:
Moritz Halbritter
2022-11-24 12:00:22 +01:00
parent 8d6803ecce
commit e8222389d9

View File

@@ -21,10 +21,13 @@ class RandomPortTests {
private TestRestTemplate template;
@Test
void shouldGetResponse() {
void check() {
assertThat(this.port).isNotZero();
}
@Test
void testRestTemplateWorks() {
ResponseEntity<String> response = this.template.getForEntity("/", String.class);
assertThat(response.getBody()).isEqualTo("Hello from Spring MVC and Tomcat");
}
}