testCopy() — netty Function Reference
Architecture documentation for the testCopy() function in DefaultHeadersTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 1aa167a1_3981_697b_f7c6_daa090034816["testCopy()"] 0eee3d0f_600b_7083_6b8d_273d78e59928["DefaultHeadersTest"] 1aa167a1_3981_697b_f7c6_daa090034816 -->|defined in| 0eee3d0f_600b_7083_6b8d_273d78e59928 style 1aa167a1_3981_697b_f7c6_daa090034816 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-base/src/test/java/io/netty/handler/codec/DefaultHeadersTest.java lines 275–326
@Test
public void testCopy() throws Exception {
TestDefaultHeaders headers = newInstance();
headers.addBoolean(of("boolean"), true);
headers.addLong(of("long"), Long.MAX_VALUE);
headers.addInt(of("int"), Integer.MIN_VALUE);
headers.addShort(of("short"), Short.MAX_VALUE);
headers.addChar(of("char"), Character.MAX_VALUE);
headers.addByte(of("byte"), Byte.MAX_VALUE);
headers.addDouble(of("double"), Double.MAX_VALUE);
headers.addFloat(of("float"), Float.MAX_VALUE);
long millis = System.currentTimeMillis();
headers.addTimeMillis(of("millis"), millis);
headers.addObject(of("object"), "Hello World");
headers.add(of("name"), of("value"));
headers = newInstance().add(headers);
assertTrue(headers.containsBoolean(of("boolean"), true));
assertFalse(headers.containsBoolean(of("boolean"), false));
assertTrue(headers.containsLong(of("long"), Long.MAX_VALUE));
assertFalse(headers.containsLong(of("long"), Long.MIN_VALUE));
assertTrue(headers.containsInt(of("int"), Integer.MIN_VALUE));
assertFalse(headers.containsInt(of("int"), Integer.MAX_VALUE));
assertTrue(headers.containsShort(of("short"), Short.MAX_VALUE));
assertFalse(headers.containsShort(of("short"), Short.MIN_VALUE));
assertTrue(headers.containsChar(of("char"), Character.MAX_VALUE));
assertFalse(headers.containsChar(of("char"), Character.MIN_VALUE));
assertTrue(headers.containsByte(of("byte"), Byte.MAX_VALUE));
assertFalse(headers.containsLong(of("byte"), Byte.MIN_VALUE));
assertTrue(headers.containsDouble(of("double"), Double.MAX_VALUE));
assertFalse(headers.containsDouble(of("double"), Double.MIN_VALUE));
assertTrue(headers.containsFloat(of("float"), Float.MAX_VALUE));
assertFalse(headers.containsFloat(of("float"), Float.MIN_VALUE));
assertTrue(headers.containsTimeMillis(of("millis"), millis));
// This test doesn't work on midnight, January 1, 1970 UTC
assertFalse(headers.containsTimeMillis(of("millis"), 0));
assertTrue(headers.containsObject(of("object"), "Hello World"));
assertFalse(headers.containsObject(of("object"), ""));
assertTrue(headers.contains(of("name"), of("value")));
assertFalse(headers.contains(of("name"), of("value1")));
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testCopy() do?
testCopy() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/DefaultHeadersTest.java.
Where is testCopy() defined?
testCopy() is defined in codec-base/src/test/java/io/netty/handler/codec/DefaultHeadersTest.java at line 275.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free