diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitTemplateConfigurer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitTemplateConfigurer.java index 4626aeda555..5f1a0f3b81c 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitTemplateConfigurer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitTemplateConfigurer.java @@ -33,7 +33,7 @@ import org.springframework.util.CollectionUtils; * properties. *

* Can be injected into application code and used to define a custom - * {@code RabbitTemplateConfigurer} whose configuration is based upon that produced by + * {@code RabbitTemplate} whose configuration is based upon that produced by * auto-configuration. * * @author Stephane Nicoll diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java index de679afe4f7..1143451cf34 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java @@ -116,10 +116,10 @@ class CollectionBinderTests { .satisfies((ex) -> { Set unbound = ((UnboundConfigurationPropertiesException) ex.getCause()) .getUnboundProperties(); - assertThat(unbound).hasSize(1); - ConfigurationProperty property = unbound.iterator().next(); - assertThat(property.getName()).hasToString("foo[3]"); - assertThat(property.getValue()).isEqualTo("3"); + assertThat(unbound).singleElement().satisfies((property) -> { + assertThat(property.getName()).hasToString("foo[3]"); + assertThat(property.getValue()).isEqualTo("3"); + }); }); } @@ -136,10 +136,10 @@ class CollectionBinderTests { .satisfies((ex) -> { Set unbound = ((UnboundConfigurationPropertiesException) ex.getCause()) .getUnboundProperties(); - assertThat(unbound).hasSize(1); - ConfigurationProperty property = unbound.iterator().next(); - assertThat(property.getName()).hasToString("foo[1].missing"); - assertThat(property.getValue()).isEqualTo("bad"); + assertThat(unbound).singleElement().satisfies((property) -> { + assertThat(property.getName()).hasToString("foo[1].missing"); + assertThat(property.getValue()).isEqualTo("bad"); + }); }); } @@ -152,10 +152,10 @@ class CollectionBinderTests { source.put("foo[0].string", "test"); this.sources.add(source); List list = this.binder.bind("foo", Bindable.listOf(ExampleCollectionBean.class)).get(); - assertThat(list).hasSize(1); - ExampleCollectionBean bean = list.get(0); - assertThat(bean.getItems()).containsExactly("a", "b", "d"); - assertThat(bean.getString()).isEqualTo("test"); + assertThat(list).singleElement().satisfies((bean) -> { + assertThat(bean.getItems()).containsExactly("a", "b", "d"); + assertThat(bean.getString()).isEqualTo("test"); + }); } @Test @@ -170,10 +170,10 @@ class CollectionBinderTests { .satisfies((ex) -> { Set unbound = ((UnboundConfigurationPropertiesException) ex.getCause()) .getUnboundProperties(); - assertThat(unbound).hasSize(1); - ConfigurationProperty property = unbound.iterator().next(); - assertThat(property.getName()).hasToString("foo[4].value"); - assertThat(property.getValue()).isEqualTo("4"); + assertThat(unbound).singleElement().satisfies((property) -> { + assertThat(property.getName()).hasToString("foo[4].value"); + assertThat(property.getValue()).isEqualTo("4"); + }); }); }