diff --git a/test-support/src/test/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServerFactoryBeanTests.java b/test-support/src/test/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServerFactoryBeanTests.java index c5501a84..d938fac5 100644 --- a/test-support/src/test/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServerFactoryBeanTests.java +++ b/test-support/src/test/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServerFactoryBeanTests.java @@ -37,15 +37,15 @@ public class EmbeddedLdapServerFactoryBeanTests { @After public void setup() { - if (ctx != null) { - ctx.close(); + if (this.ctx != null) { + this.ctx.close(); } } @Test public void testServerStartup() throws Exception { - ctx = new ClassPathXmlApplicationContext("/applicationContext-ldifPopulator.xml"); - LdapTemplate ldapTemplate = ctx.getBean(LdapTemplate.class); + this.ctx = new ClassPathXmlApplicationContext("/applicationContext-ldifPopulator.xml"); + LdapTemplate ldapTemplate = this.ctx.getBean(LdapTemplate.class); assertThat(ldapTemplate).isNotNull(); List list = ldapTemplate.search(LdapQueryBuilder.query().where("objectclass").is("person"), diff --git a/test-support/src/test/java/org/springframework/ldap/test/unboundid/TestContextSourceFactoryBeanTests.java b/test-support/src/test/java/org/springframework/ldap/test/unboundid/TestContextSourceFactoryBeanTests.java index c81cc578..cc643360 100644 --- a/test-support/src/test/java/org/springframework/ldap/test/unboundid/TestContextSourceFactoryBeanTests.java +++ b/test-support/src/test/java/org/springframework/ldap/test/unboundid/TestContextSourceFactoryBeanTests.java @@ -37,15 +37,15 @@ public class TestContextSourceFactoryBeanTests { @After public void setup() { - if (ctx != null) { - ctx.close(); + if (this.ctx != null) { + this.ctx.close(); } } @Test public void testServerStartup() throws Exception { - ctx = new ClassPathXmlApplicationContext("/applicationContext-testContextSource.xml"); - LdapTemplate ldapTemplate = ctx.getBean(LdapTemplate.class); + this.ctx = new ClassPathXmlApplicationContext("/applicationContext-testContextSource.xml"); + LdapTemplate ldapTemplate = this.ctx.getBean(LdapTemplate.class); assertThat(ldapTemplate).isNotNull(); List list = ldapTemplate.search(LdapQueryBuilder.query().where("objectclass").is("person"),