@Test
public void testAddOrReplace()
{
try {
HTTPHeaders headers = new HTTPHeaders();
headers.addOrReplace(new HTTPHeader("key", "value"));
assertEquals("value", headers.get("key").getValue());
headers.addOrReplace(new HTTPHeader("key", "value2"));
assertEquals("value2", headers.get("key").getValue());
}
catch(NoSuchHTTPHeaderException ex) {
fail(ex.getMessage());
}
}