diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataTests.java index 121883aaaa..2d69eea159 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataTests.java @@ -96,7 +96,7 @@ class ConfigDataTests { MapPropertySource source2 = new MapPropertySource("test", Collections.emptyMap()); Options options1 = Options.of(Option.IGNORE_IMPORTS); Options options2 = Options.of(Option.IGNORE_PROFILES); - PropertySourceOptions propertySourceOptions = (source) -> source == source1 ? options1 : options2; + PropertySourceOptions propertySourceOptions = (source) -> (source != source1) ? options2 : options1; ConfigData configData = new ConfigData(Arrays.asList(source1, source2), propertySourceOptions); assertThat(configData.getOptions(source1)).isEqualTo(options1); assertThat(configData.getOptions(source2)).isEqualTo(options2);