Code example for HttpMessage

Methods: getParamssetParams

0
        assertEquals(0, headers.length);
    } 
 
    public void testParameters() { 
        HttpMessage message = new HttpMessageMockup();
        assertNotNull(message.getParams());
        HttpParams params = new BasicHttpParams();
        message.setParams(params);
        assertTrue(params == message.getParams());
    } 
 
    public void testInvalidInput() { 
        HttpMessage message = new HttpMessageMockup();
        try { 
            message.setParams(null);
            fail("IllegalArgumentException should have been thrown");
        } catch (IllegalArgumentException ex) {
            // expected 
        } 
        try { 
            message.addHeader(null, null);