DocumentDescriptor { public void addParameter(final KeyValuePair pair) { parameters.add(pair); } DocumentDescriptor(final URI documentUri);  DocumentDescriptor(final URI documentUri,
            final RequestMethod requestMethod);  DocumentDescriptor(final URI documentUri,
            final RequestMethod requestMethod, final boolean force); void setURI(final URI value); URI getUri(); boolean isForceLoad(); RequestMethod getMethod(); FetchAttributes getAttributes(); void setAttributes(final FetchAttributes value); void addParameters(final Collection<KeyValuePair> pairs); void addParameter(final KeyValuePair pair); void addParamater(final String key, final Object value); void addParameters(final Map<String, Object> parameters); Collection<KeyValuePair> getParameters();  }
@Test public void testAddParameter() throws Exception { final URI uri = new URI("http: final DocumentDescriptor descriptor = new DocumentDescriptor(uri); final String name1 = "name1"; final String value1 = "value1"; final KeyValuePair pair1 = new KeyValuePair(name1, value1); Assert.assertFalse("exected to get no value", descriptor.getParameters().contains(pair1)); descriptor.addParameter(pair1); Assert.assertTrue(descriptor.getParameters().contains(pair1)); final String name2 = "name2"; final String value2 = "value2"; final KeyValuePair pair2 = new KeyValuePair(name2, value2); Assert.assertFalse("exected to get no value", descriptor.getParameters().contains(pair2)); descriptor.addParameter(pair2); Assert.assertTrue(descriptor.getParameters().contains(pair1)); Assert.assertTrue(descriptor.getParameters().contains(pair2)); }