@Test
public void testHeaderFormatting() throws Exception {

    final CharArrayBuffer buf = new CharArrayBuffer(64);
    final Header header1 = new BasicHeader("name", "value");
    this.formatter.formatHeader(buf, header1);
    Assert.assertEquals("name: value", buf.toString());
    buf.clear();
    final Header header2 = new BasicHeader("name", null);
    this.formatter.formatHeader(buf, header2);
    Assert.assertEquals("name: ", buf.toString());
}