Map<String, String> propertiesToAdd = new HashMap<String, String>();
propertiesToAdd.put("prop1", "value1");
propertiesToAdd.put("prop2", "value2");
sardine.setCustomProps(resourceUri, propertiesToAdd, null);
DavResource resource = sardine.getResources(resourceUri).get(0);
Map<String, String> customProps = resource.getCustomProps();
assertEquals("value1", customProps.get("prop1"));
assertEquals("value2", customProps.get("prop2"));
sardine.setCustomProps(resourceUri, null, Arrays.asList("prop2", "prop3"));
resource = sardine.getResources(resourceUri).get(0);
customProps = resource.getCustomProps();
assertEquals("value1", customProps.get("prop1"));
assertFalse(customProps.containsKey("prop2"));
}