diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpointSerializationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpointSerializationTests.java index 6b4c4a6004..88938e8038 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpointSerializationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpointSerializationTests.java @@ -166,7 +166,7 @@ public class ConfigurationPropertiesReportEndpointSerializationTests { Map map = (Map) nestedProperties .get("properties"); assertNotNull(map); - assertEquals(2, map.size()); + assertEquals(3, map.size()); assertEquals(null, (map.get("map"))); } @@ -206,7 +206,8 @@ public class ConfigurationPropertiesReportEndpointSerializationTests { Map map = (Map) nestedProperties .get("properties"); assertNotNull(map); - assertEquals(2, map.size()); + // Only one property is mapped in metadata so the others are ignored + assertEquals(1, map.size()); assertEquals("foo", ((Map) map.get("map")).get("name")); } diff --git a/spring-boot-actuator/src/test/resources/META-INF/test-spring-configuration-metadata.json b/spring-boot-actuator/src/test/resources/META-INF/test-spring-configuration-metadata.json index 3363bf04fa..712014c6c6 100644 --- a/spring-boot-actuator/src/test/resources/META-INF/test-spring-configuration-metadata.json +++ b/spring-boot-actuator/src/test/resources/META-INF/test-spring-configuration-metadata.json @@ -1,10 +1,12 @@ {"properties": [ { "name": "bar.name", + "type": "java.util.Map", "dataType": "java.lang.String" }, { "name": "spam.map.name", + "type": "java.util.Map", "dataType": "java.lang.String" } ]}