@Test
public void testContains() {

    TestDefaultHeaders headers = newInstance();
    headers.addBoolean(of("boolean"), true);
    assertTrue(headers.containsBoolean(of("boolean"), true));
    assertFalse(headers.containsBoolean(of("boolean"), false));
    headers.addLong(of("long"), Long.MAX_VALUE);
    assertTrue(headers.containsLong(of("long"), Long.MAX_VALUE));
    assertFalse(headers.containsLong(of("long"), Long.MIN_VALUE));
    headers.addInt(of("int"), Integer.MIN_VALUE);
    assertTrue(headers.containsInt(of("int"), Integer.MIN_VALUE));
    assertFalse(headers.containsInt(of("int"), Integer.MAX_VALUE));
    headers.addShort(of("short"), Short.MAX_VALUE);
    assertTrue(headers.containsShort(of("short"), Short.MAX_VALUE));
    assertFalse(headers.containsShort(of("short"), Short.MIN_VALUE));
    headers.addChar(of("char"), Character.MAX_VALUE);
    assertTrue(headers.containsChar(of("char"), Character.MAX_VALUE));
    assertFalse(headers.containsChar(of("char"), Character.MIN_VALUE));
    headers.addByte(of("byte"), Byte.MAX_VALUE);
    assertTrue(headers.containsByte(of("byte"), Byte.MAX_VALUE));
    assertFalse(headers.containsLong(of("byte"), Byte.MIN_VALUE));
    headers.addDouble(of("double"), Double.MAX_VALUE);
    assertTrue(headers.containsDouble(of("double"), Double.MAX_VALUE));
    assertFalse(headers.containsDouble(of("double"), Double.MIN_VALUE));
    headers.addFloat(of("float"), Float.MAX_VALUE);
    assertTrue(headers.containsFloat(of("float"), Float.MAX_VALUE));
    assertFalse(headers.containsFloat(of("float"), Float.MIN_VALUE));
    long millis = System.currentTimeMillis();
    headers.addTimeMillis(of("millis"), millis);
    assertTrue(headers.containsTimeMillis(of("millis"), millis));
    // This test doesn't work on midnight, January 1, 1970 UTC
    assertFalse(headers.containsTimeMillis(of("millis"), 0));
    headers.addObject(of("object"), "Hello World");
    assertTrue(headers.containsObject(of("object"), "Hello World"));
    assertFalse(headers.containsObject(of("object"), ""));
    headers.add(of("name"), of("value"));
    assertTrue(headers.contains(of("name"), of("value")));
    assertFalse(headers.contains(of("name"), of("value1")));
}