assert hdrs.capacity() > 3;
}
public static void testPutHeaderIfAbsent() {
Headers hdrs=createHeaders(3);
Header hdr=hdrs.putHeaderIfAbsent(FRAG_ID, new MyHeader());
assert hdr == h2;
assert hdr == hdrs.getHeader(FRAG_ID);
assert hdrs.size() == 3;
assert hdrs.capacity() == 3;
hdr=hdrs.putHeaderIfAbsent((short)400, new MyHeader());
System.out.println("hdrs = " + hdrs);
assert hdr == null;
assert hdrs.size() == 4;
assert hdrs.capacity() == 6;
hdrs.putHeader(FRAG_ID,null);
assert hdrs.getHeader(FRAG_ID) == null;
MyHeader myhdr=new MyHeader();
hdr=hdrs.putHeaderIfAbsent(FRAG_ID, myhdr);
assert hdr == null;
assert hdrs.getHeader(FRAG_ID) == myhdr;
}