Home / Function/ testSignIdGenerator() — netty Function Reference

testSignIdGenerator() — netty Function Reference

Architecture documentation for the testSignIdGenerator() function in QuicConnectionIdGeneratorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  23d93d58_7b49_059d_eba3_f378613e6c03["testSignIdGenerator()"]
  0c6761d6_a118_49ca_d21a_23b24fe8ec90["QuicConnectionIdGeneratorTest"]
  23d93d58_7b49_059d_eba3_f378613e6c03 -->|defined in| 0c6761d6_a118_49ca_d21a_23b24fe8ec90
  style 23d93d58_7b49_059d_eba3_f378613e6c03 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicConnectionIdGeneratorTest.java lines 67–89

    @Test
    public void testSignIdGenerator() {
        QuicConnectionIdGenerator idGenerator = QuicConnectionIdGenerator.signGenerator();

        byte[] input = new byte[1024];
        byte[] input2 = new byte[1024];
        ThreadLocalRandom.current().nextBytes(input);
        ThreadLocalRandom.current().nextBytes(input2);
        ByteBuffer id = idGenerator.newId(ByteBuffer.wrap(input), 10);
        ByteBuffer id2 = idGenerator.newId(ByteBuffer.wrap(input), 10);
        ByteBuffer id3 = idGenerator.newId(ByteBuffer.wrap(input2), 10);
        assertEquals(10, id.remaining());
        assertEquals(10, id2.remaining());
        assertEquals(10, id3.remaining());
        assertEquals(id, id2);
        assertNotEquals(id, id3);

        assertThrows(UnsupportedOperationException.class, () -> idGenerator.newId(10));
        assertThrows(NullPointerException.class, () -> idGenerator.newId(null, 10));
        assertThrows(IllegalArgumentException.class, () -> idGenerator.newId(ByteBuffer.wrap(new byte[0]), 10));
        assertThrows(IllegalArgumentException.class, () ->
                idGenerator.newId(ByteBuffer.wrap(input), Integer.MAX_VALUE));
    }

Domain

Subdomains

Frequently Asked Questions

What does testSignIdGenerator() do?
testSignIdGenerator() is a function in the netty codebase, defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicConnectionIdGeneratorTest.java.
Where is testSignIdGenerator() defined?
testSignIdGenerator() is defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicConnectionIdGeneratorTest.java at line 67.

Analyze Your Own Codebase

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

Try Supermodel Free