public void testGetContentLength() throws Exception {
    MutableBodyDescriptor bd = null;

    bd = newBodyDescriptor();
    assertEquals(-1, bd.getContentLength());

    bd.addField(new TestField("Content-Length", "9901"));
    assertEquals(9901, bd.getContentLength());

    // only the first content-length counts
    bd.addField(new TestField("Content-Length", "1239901"));
    assertEquals(9901, bd.getContentLength());
  }