@Test
public void testHeaderFormattingInvalidInput() throws Exception {

    final CharArrayBuffer buf = new CharArrayBuffer(64);
    final Header header = new BasicHeader("name", "value");
    try {
        this.formatter.formatHeader(null, header);
        Assert.fail("NullPointerException should habe been thrown");
    } catch (final NullPointerException ex) {
        // expected
    }
    try {
        this.formatter.formatHeader(buf, null);
        Assert.fail("NullPointerException should habe been thrown");
    } catch (final NullPointerException ex) {
        // expected
    }
}