Code example for BasicHeader

0
        assertNull(httpentity.getContentType());
    } 
 
    public void testContentEncoding() throws Exception { 
        HttpEntityMockup httpentity = new HttpEntityMockup();
        httpentity.setContentEncoding(new BasicHeader(HTTP.CONTENT_ENCODING, "gzip"));
        assertEquals(HTTP.CONTENT_ENCODING, httpentity.getContentEncoding().getName());
        assertEquals("gzip", httpentity.getContentEncoding().getValue());
 
        httpentity.setContentEncoding("gzip");
        assertEquals(HTTP.CONTENT_ENCODING, httpentity.getContentEncoding().getName());
        assertEquals("gzip", httpentity.getContentEncoding().getValue());
 
        httpentity.setContentEncoding((Header)null);
        assertNull(httpentity.getContentEncoding());
        httpentity.setContentEncoding((String)null);
        assertNull(httpentity.getContentEncoding());
    } 
 
    public void testChunkingFlag() throws Exception {