From a0a0bea427e96781397bddbf5012198c23747005 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 May 2018 14:37:32 +0200 Subject: [PATCH] Polish "Improve LDAP auto-configuration" Closes gh-13136 --- .../boot/autoconfigure/ldap/LdapAutoConfigurationTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ldap/LdapAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ldap/LdapAutoConfigurationTests.java index c9eaf6d48c..c20bb1f947 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ldap/LdapAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ldap/LdapAutoConfigurationTests.java @@ -101,8 +101,7 @@ public class LdapAutoConfigurationTests { @Test public void templateExists() { this.contextRunner.withPropertyValues("spring.ldap.urls:ldap://localhost:389") - .run(context -> assertThat( - context.getBeanNamesForType(LdapTemplate.class)).hasSize(1)); + .run(context -> assertThat(context).hasSingleBean(LdapTemplate.class)); } }