RemoteDeliveryConfiguration { public Properties getJavaxAdditionalProperties() { return javaxAdditionalProperties; } RemoteDeliveryConfiguration(MailetConfig mailetConfig, DomainList domainList); Properties createFinalJavaxProperties(); boolean isDebug(); List<Duration> getDelayTimes(); int getMaxRetries(); long getSmtpTimeout(); boolean isSendPartial(); int getConnectionTimeout(); Collection<String> getGatewayServer(); String getAuthUser(); String getAuthPass(); boolean isBindUsed(); String getBounceProcessor(); boolean isUsePriority(); boolean isStartTLS(); boolean isSSLEnable(); HeloNameProvider getHeloNameProvider(); MailQueueName getOutGoingQueueName(); Properties getJavaxAdditionalProperties(); int getDnsProblemRetry(); String getBindAddress(); static final String USE_PRIORITY; static final String MAX_DNS_PROBLEM_RETRIES; static final String HELO_NAME; static final String JAVAX_PREFIX; static final String BIND; static final String GATEWAY_PASSWORD; static final String GATEWAY_USERNAME_COMPATIBILITY; static final String GATEWAY_USERNAME; static final String GATEWAY_PORT; static final String GATEWAY; static final String SSL_ENABLE; static final String START_TLS; static final String BOUNCE_PROCESSOR; static final String SENDPARTIAL; static final String TIMEOUT; static final String CONNECTIONTIMEOUT; static final String OUTGOING; static final String MAX_RETRIES; static final String DELAY_TIME; static final String DEBUG; static final int DEFAULT_SMTP_TIMEOUT; static final MailQueueName DEFAULT_OUTGOING_QUEUE_NAME; static final int DEFAULT_CONNECTION_TIMEOUT; static final int DEFAULT_DNS_RETRY_PROBLEM; static final int DEFAULT_MAX_RETRY; static final String ADDRESS_PORT_SEPARATOR; }
@Test void getJavaxAdditionalPropertiesShouldBeEmptyByDefault() { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .build(); assertThat(new RemoteDeliveryConfiguration(mailetConfig, mock(DomainList.class)).getJavaxAdditionalProperties()) .isEmpty(); }
@Test void getJavaxAdditionalPropertiesShouldTakeOneEntryIntoAccount() { String key1 = RemoteDeliveryConfiguration.JAVAX_PREFIX + "property1"; String value1 = "value1"; FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .setProperty(key1, value1) .build(); assertThat(new RemoteDeliveryConfiguration(mailetConfig, mock(DomainList.class)).getJavaxAdditionalProperties()) .containsOnly(MapEntry.entry(key1, value1)); }
@Test void getJavaxAdditionalPropertiesShouldTakeTwoEntriesIntoAccount() { String key1 = RemoteDeliveryConfiguration.JAVAX_PREFIX + "property1"; String value1 = "value1"; String key2 = RemoteDeliveryConfiguration.JAVAX_PREFIX + "property2"; String value2 = "value2"; FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .setProperty(key1, value1) .setProperty(key2, value2) .build(); assertThat(new RemoteDeliveryConfiguration(mailetConfig, mock(DomainList.class)).getJavaxAdditionalProperties()) .containsOnly(MapEntry.entry(key1, value1), MapEntry.entry(key2, value2)); }
@Test void getJavaxAdditionalPropertiesShouldTakeOneEmptyEntryIntoAccount() { String key1 = RemoteDeliveryConfiguration.JAVAX_PREFIX + "property1"; FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .setProperty(key1, "") .build(); assertThat(new RemoteDeliveryConfiguration(mailetConfig, mock(DomainList.class)).getJavaxAdditionalProperties()) .containsOnly(MapEntry.entry(key1, "")); }