Home / Function/ test() — netty Function Reference

test() — netty Function Reference

Architecture documentation for the test() function in KeytoolSelfSignedCertGeneratorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  e02dabfa_5a98_e760_fccd_e963a743c975["test()"]
  9f6a0e2a_18a1_7169_e92e_f7c8ea001faa["KeytoolSelfSignedCertGeneratorTest"]
  e02dabfa_5a98_e760_fccd_e963a743c975 -->|defined in| 9f6a0e2a_18a1_7169_e92e_f7c8ea001faa
  style e02dabfa_5a98_e760_fccd_e963a743c975 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/util/KeytoolSelfSignedCertGeneratorTest.java lines 36–51

    @Test
    public void test() throws Exception {
        SelfSignedCertificate.Builder builder = SelfSignedCertificate.builder()
                .fqdn("example.com")
                .algorithm("RSA")
                .bits(2048);
        Assertions.assertTrue(builder.generateKeytool());
        Assertions.assertEquals("RSA", builder.privateKey.getAlgorithm());

        X509Certificate cert;
        try (InputStream certStream = Files.newInputStream(Paths.get(builder.paths[0]))) {
            cert = (X509Certificate) CertificateFactory.getInstance("X509").generateCertificate(certStream);
        }
        cert.checkValidity();
        Assertions.assertEquals("CN=example.com", cert.getSubjectX500Principal().getName());
    }

Domain

Subdomains

Frequently Asked Questions

What does test() do?
test() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/util/KeytoolSelfSignedCertGeneratorTest.java.
Where is test() defined?
test() is defined in handler/src/test/java/io/netty/handler/ssl/util/KeytoolSelfSignedCertGeneratorTest.java at line 36.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free