PoolableUnboundConnectionFactory extends BasePooledObjectFactory<LdapConnection> { public void setValidator(LdapConnectionValidator validator) { this.validator = validator; } PoolableUnboundConnectionFactory(LdapConnectionConfig config); LdapConnectionValidator getValidator(); void setValidator(LdapConnectionValidator validator); void activateObject(LdapConnection connection); void destroyObject(LdapConnection connection); LdapConnection create(); PooledObject<LdapConnection> wrap(LdapConnection foo); void passivateObject(LdapConnection connection); boolean validateObject(LdapConnection connection);  }
@Test public void testSetValidator() { LdapConnectionValidator validator = Mockito.mock(LdapConnectionValidator.class); factory.setValidator(validator); assertEquals(validator, factory.getValidator()); }