diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator/src/test/java/smoketest/actuator/SampleActuatorApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator/src/test/java/smoketest/actuator/SampleActuatorApplicationTests.java index 8ddd0cefe697..360e0719a5a1 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator/src/test/java/smoketest/actuator/SampleActuatorApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator/src/test/java/smoketest/actuator/SampleActuatorApplicationTests.java @@ -177,6 +177,18 @@ void testLegacyHyphen() { assertThat(entity.getBody()).contains(entry("legacy", "legacy")); } + @Test + @SuppressWarnings("unchecked") + void testInfo() { + ResponseEntity> entity = asMapEntity( + this.restTemplate.withBasicAuth("user", "password").getForEntity("/actuator/info", Map.class)); + assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); + assertThat(entity.getBody()).containsKey("build"); + Map body = entity.getBody(); + Map example = (Map) body.get("example"); + assertThat(example).containsEntry("someKey", "someValue"); + } + @SuppressWarnings({ "unchecked", "rawtypes" }) static ResponseEntity> asMapEntity(ResponseEntity entity) { return (ResponseEntity) entity;