This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-net.git
commit daaa5ac312dff42d0432372b431acf81efba5e18 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue May 28 08:10:48 2024 -0400 Add tests --- .../commons/net/util/TrustManagerUtilsTest.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/test/java/org/apache/commons/net/util/TrustManagerUtilsTest.java b/src/test/java/org/apache/commons/net/util/TrustManagerUtilsTest.java index c0a85663..a2bd3007 100644 --- a/src/test/java/org/apache/commons/net/util/TrustManagerUtilsTest.java +++ b/src/test/java/org/apache/commons/net/util/TrustManagerUtilsTest.java @@ -1,6 +1,11 @@ package org.apache.commons.net.util; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.security.KeyStoreException; import org.junit.jupiter.api.Test; @@ -9,6 +14,21 @@ import org.junit.jupiter.api.Test; */ public class TrustManagerUtilsTest { + @Test + public void testGetAcceptAllTrustManager() { + assertNotNull(TrustManagerUtils.getAcceptAllTrustManager()); + } + + @Test + public void testGetDefaultTrustManager() throws KeyStoreException, GeneralSecurityException { + assertNotNull(TrustManagerUtils.getDefaultTrustManager(KeyStore.getInstance(KeyStore.getDefaultType()))); + } + + @Test + public void testGetValidateServerCertificateTrustManager() { + assertNotNull(TrustManagerUtils.getValidateServerCertificateTrustManager()); + } + @SuppressWarnings("deprecation") @Test public void testToConstructor() {