Search in sources :

Example 31 with SmtpAgentException

use of org.nhindirect.gateway.smtp.SmtpAgentException in project nhin-d by DirectProject.

the class RecipAndSenderIsNotLocalTest method testNullDomainList.

public void testNullDomainList() throws Exception {
    final MatcherConfig newConfig = mock(MatcherConfig.class);
    when(newConfig.getCondition()).thenReturn(null);
    RecipAndSenderIsNotLocal matcher = new RecipAndSenderIsNotLocal();
    boolean exceptionOccured = false;
    try {
        matcher.init(newConfig);
    } catch (SmtpAgentException e) {
        exceptionOccured = true;
    }
    assertTrue(exceptionOccured);
}
Also used : SmtpAgentException(org.nhindirect.gateway.smtp.SmtpAgentException) MatcherConfig(org.apache.mailet.MatcherConfig)

Aggregations

SmtpAgentException (org.nhindirect.gateway.smtp.SmtpAgentException)31 PolicyParseException (org.nhindirect.policy.PolicyParseException)20 AddressException (javax.mail.internet.AddressException)19 IOException (java.io.IOException)10 CertificateException (java.security.cert.CertificateException)10 Collection (java.util.Collection)8 ArrayList (java.util.ArrayList)7 Setting (org.nhind.config.Setting)7 Setting (org.nhindirect.config.model.Setting)7 LDAPCertificateStore (org.nhindirect.stagent.cert.impl.LDAPCertificateStore)7 X509Certificate (java.security.cert.X509Certificate)6 HashMap (java.util.HashMap)6 CertificateResolver (org.nhindirect.stagent.cert.CertificateResolver)5 KeyStoreCertificateStoreProvider (org.nhindirect.stagent.cert.impl.provider.KeyStoreCertificateStoreProvider)5 LdapCertificateStoreProvider (org.nhindirect.stagent.cert.impl.provider.LdapCertificateStoreProvider)5 MultiDomainTrustAnchorResolverProvider (org.nhindirect.stagent.trust.provider.MultiDomainTrustAnchorResolverProvider)5 UniformTrustAnchorResolverProvider (org.nhindirect.stagent.trust.provider.UniformTrustAnchorResolverProvider)5 DomainPolicyResolverProvider (org.nhindirect.stagent.policy.impl.provider.DomainPolicyResolverProvider)4 ByteArrayInputStream (java.io.ByteArrayInputStream)3 InternetAddress (javax.mail.internet.InternetAddress)3