/**
* Test multiple headers with single values.
*/
public void testMultipleHeaders() {
MutableHttpHeaders headers = new DefaultMutableHttpHeaders();
headers.addHeader("h1", "v1");
headers.addHeader("h2", "v2");
assertEquals("", "v1", headers.getHeader("h1"));
assertEquals("", "v2", headers.getHeader("h2"));
Enumeration names = headers.getHeaderNames();
assertNotNull("", names);
assertEquals("", true, names.hasMoreElements());
assertEquals("", "h1", names.nextElement());
assertEquals("", true, names.hasMoreElements());
assertEquals("", "h2", names.nextElement());
assertEquals("", false, names.hasMoreElements());
Enumeration values = headers.getHeaders("h1");
assertNotNull("", values);
assertEquals("", true, values.hasMoreElements());
assertEquals("", "v1", values.nextElement());
assertEquals("", false, values.hasMoreElements());
values = headers.getHeaders("h2");
assertNotNull("", values);
assertEquals("", true, values.hasMoreElements());
assertEquals("", "v2", values.nextElement());
assertEquals("", false, values.hasMoreElements());
}