@Test
public void testConvertLdapExceptions() {

    // Test the Exceptions in the javax.naming package
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.directory.AttributeInUseException()).getClass())
.isEqualTo(org.springframework.ldap.AttributeInUseException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.directory.AttributeModificationException())
		.getClass()).isEqualTo(
org.springframework.ldap.AttributeModificationException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.CannotProceedException())
		.getClass()).isEqualTo(
org.springframework.ldap.CannotProceedException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.CommunicationException())
		.getClass()).isEqualTo(
org.springframework.ldap.CommunicationException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.ConfigurationException())
		.getClass()).isEqualTo(
org.springframework.ldap.ConfigurationException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.ContextNotEmptyException()).getClass())
.isEqualTo(org.springframework.ldap.ContextNotEmptyException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.InsufficientResourcesException()).getClass())
.isEqualTo(org.springframework.ldap.InsufficientResourcesException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.InterruptedNamingException()).getClass())
.isEqualTo(org.springframework.ldap.InterruptedNamingException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.directory.InvalidAttributeIdentifierException())
		.getClass()).isEqualTo(
org.springframework.ldap.InvalidAttributeIdentifierException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.directory.InvalidAttributesException())
		.getClass()).isEqualTo(
org.springframework.ldap.InvalidAttributesException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.directory.InvalidAttributeValueException())
		.getClass()).isEqualTo(
org.springframework.ldap.InvalidAttributeValueException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.InvalidNameException())
		.getClass()).isEqualTo(
org.springframework.ldap.InvalidNameException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.directory.InvalidSearchControlsException())
		.getClass()).isEqualTo(
org.springframework.ldap.InvalidSearchControlsException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.directory.InvalidSearchFilterException())
		.getClass()).isEqualTo(
org.springframework.ldap.InvalidSearchFilterException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.SizeLimitExceededException()).getClass())
.isEqualTo(org.springframework.ldap.SizeLimitExceededException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.TimeLimitExceededException()).getClass())
.isEqualTo(org.springframework.ldap.TimeLimitExceededException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.LimitExceededException())
		.getClass()).isEqualTo(
org.springframework.ldap.LimitExceededException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.LinkLoopException())
		.getClass()).isEqualTo(
org.springframework.ldap.LinkLoopException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.MalformedLinkException())
		.getClass()).isEqualTo(
org.springframework.ldap.MalformedLinkException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.LinkException())
		.getClass()).isEqualTo(
org.springframework.ldap.LinkException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.NameAlreadyBoundException()).getClass())
.isEqualTo(org.springframework.ldap.NameAlreadyBoundException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.NameNotFoundException())
		.getClass()).isEqualTo(
org.springframework.ldap.NameNotFoundException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.NoPermissionException())
		.getClass()).isEqualTo(
org.springframework.ldap.NoPermissionException.class);
sertThat(
LdapUtils
		.convertLdapException(new javax.naming.AuthenticationException())
		.getClass()).isEqualTo(
org.springframework.ldap.AuthenticationException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.AuthenticationNotSupportedException())
		.getClass()).isEqualTo(
org.springframework.ldap.AuthenticationNotSupportedException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.NoInitialContextException()).getClass())
.isEqualTo(org.springframework.ldap.NoInitialContextException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.directory.NoSuchAttributeException()).getClass())
.isEqualTo(org.springframework.ldap.NoSuchAttributeException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.NotContextException())
		.getClass()).isEqualTo(
org.springframework.ldap.NotContextException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.OperationNotSupportedException()).getClass())
.isEqualTo(org.springframework.ldap.OperationNotSupportedException.class);
sertThat(
LdapUtils.convertLdapException(new javax.naming.PartialResultException())
		.getClass()).isEqualTo(
org.springframework.ldap.PartialResultException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.directory.SchemaViolationException()).getClass())
.isEqualTo(org.springframework.ldap.SchemaViolationException.class);
sertThat(
LdapUtils.convertLdapException(
		new javax.naming.ServiceUnavailableException()).getClass())
.isEqualTo(org.springframework.ldap.ServiceUnavailableException.class);
    // Test Exceptions that extend javax.naming packaage extensions
sertThat(
LdapUtils.convertLdapException(new MockAttributeInUseException())
		.getClass()).isEqualTo(
org.springframework.ldap.AttributeInUseException.class);
sertThat(
LdapUtils.convertLdapException(new MockAttributeModificationException())
		.getClass()).isEqualTo(
org.springframework.ldap.AttributeModificationException.class);
sertThat(
LdapUtils.convertLdapException(new MockCannotProceedException())
		.getClass()).isEqualTo(
org.springframework.ldap.CannotProceedException.class);
sertThat(
LdapUtils.convertLdapException(new MockCommunicationException())
		.getClass()).isEqualTo(
org.springframework.ldap.CommunicationException.class);
sertThat(
LdapUtils.convertLdapException(new MockConfigurationException())
		.getClass()).isEqualTo(
org.springframework.ldap.ConfigurationException.class);
sertThat(
LdapUtils.convertLdapException(new MockContextNotEmptyException())
		.getClass()).isEqualTo(
org.springframework.ldap.ContextNotEmptyException.class);
sertThat(
LdapUtils.convertLdapException(new MockInsufficientResourcesException())
		.getClass()).isEqualTo(
org.springframework.ldap.InsufficientResourcesException.class);
sertThat(
LdapUtils.convertLdapException(new MockInterruptedNamingException())
		.getClass()).isEqualTo(
org.springframework.ldap.InterruptedNamingException.class);
sertThat(
LdapUtils.convertLdapException(
		new MockInvalidAttributeIdentifierException()).getClass())
.isEqualTo(
		org.springframework.ldap.InvalidAttributeIdentifierException.class);
sertThat(
LdapUtils.convertLdapException(new MockInvalidAttributesException())
		.getClass()).isEqualTo(
org.springframework.ldap.InvalidAttributesException.class);
sertThat(
LdapUtils.convertLdapException(new MockInvalidAttributeValueException())
		.getClass()).isEqualTo(
org.springframework.ldap.InvalidAttributeValueException.class);
sertThat(
LdapUtils.convertLdapException(new MockInvalidNameException()).getClass())
.isEqualTo(org.springframework.ldap.InvalidNameException.class);
sertThat(
LdapUtils.convertLdapException(new MockInvalidSearchControlsException())
		.getClass()).isEqualTo(
org.springframework.ldap.InvalidSearchControlsException.class);
sertThat(
LdapUtils.convertLdapException(new MockInvalidSearchFilterException())
		.getClass()).isEqualTo(
org.springframework.ldap.InvalidSearchFilterException.class);
sertThat(
LdapUtils.convertLdapException(new MockSizeLimitExceededException())
		.getClass()).isEqualTo(
org.springframework.ldap.SizeLimitExceededException.class);
sertThat(
LdapUtils.convertLdapException(new MockTimeLimitExceededException())
		.getClass()).isEqualTo(
org.springframework.ldap.TimeLimitExceededException.class);
sertThat(
LdapUtils.convertLdapException(new MockLimitExceededException())
		.getClass()).isEqualTo(
org.springframework.ldap.LimitExceededException.class);
sertThat(LdapUtils.convertLdapException(new MockLinkLoopException()).getClass())
.isEqualTo(org.springframework.ldap.LinkLoopException.class);
sertThat(
LdapUtils.convertLdapException(new MockMalformedLinkException())
		.getClass()).isEqualTo(
org.springframework.ldap.MalformedLinkException.class);
sertThat(LdapUtils.convertLdapException(new MockLinkException()).getClass())
.isEqualTo(org.springframework.ldap.LinkException.class);
sertThat(
LdapUtils.convertLdapException(new MockNameAlreadyBoundException())
		.getClass()).isEqualTo(
org.springframework.ldap.NameAlreadyBoundException.class);
sertThat(
LdapUtils.convertLdapException(new MockNameNotFoundException())
		.getClass()).isEqualTo(
org.springframework.ldap.NameNotFoundException.class);
sertThat(
LdapUtils.convertLdapException(new MockNoPermissionException())
		.getClass()).isEqualTo(
org.springframework.ldap.NoPermissionException.class);
sertThat(
LdapUtils.convertLdapException(new MockAuthenticationException())
		.getClass()).isEqualTo(
org.springframework.ldap.AuthenticationException.class);
sertThat(
LdapUtils.convertLdapException(
		new MockAuthenticationNotSupportedException()).getClass())
.isEqualTo(
		org.springframework.ldap.AuthenticationNotSupportedException.class);
sertThat(
LdapUtils.convertLdapException(new MockNoInitialContextException())
		.getClass()).isEqualTo(
org.springframework.ldap.NoInitialContextException.class);
sertThat(
LdapUtils.convertLdapException(new MockNoSuchAttributeException())
		.getClass()).isEqualTo(
org.springframework.ldap.NoSuchAttributeException.class);
sertThat(
LdapUtils.convertLdapException(new MockNotContextException()).getClass())
.isEqualTo(org.springframework.ldap.NotContextException.class);
sertThat(
LdapUtils.convertLdapException(new MockOperationNotSupportedException())
		.getClass()).isEqualTo(
org.springframework.ldap.OperationNotSupportedException.class);
sertThat(
LdapUtils.convertLdapException(new MockPartialResultException())
		.getClass()).isEqualTo(
org.springframework.ldap.PartialResultException.class);
sertThat(
LdapUtils.convertLdapException(new MockSchemaViolationException())
		.getClass()).isEqualTo(
org.springframework.ldap.SchemaViolationException.class);
sertThat(
LdapUtils.convertLdapException(new MockServiceUnavailableException())
		.getClass()).isEqualTo(
org.springframework.ldap.ServiceUnavailableException.class);
}