IRI colUri = new IRI(providerURI).resolve("customer");
// res = client.post(colUri.toString() + "?test=foo", entry, opts);
String id = eTag.substring( 1, eTag.length()-1);
// Warning. AbderaClient.put(String uri,Base base,RequestOptions options) caches on the client side.
// ClientResponse res = client.put(colUri.toString() + id, entry, opts);
ClientResponse res = client.get(colUri.toString() + "/" + id, opts);
// Expected Atom server response (item was edited by another user)
// > HTTP/1.1 412 Precondition Failed
// Date: Sat, 24 Feb 2007 16:34:11 GMT
// Atom server response (item was up to date)
// > HTTP/1.1 200 OK
// Date: Sat, 24 Feb 2007 13:17:11 GMT
// > ETag: "bb4f5e86e92ddb8549604a0df0763581"
// > Last-Modified: Mon, 28 Jul 2008 10:25:37 -0500
// Assert response status code is 200 OK.
// Assert header Content-Type: application/atom+xml;type=entry
// Assert header Location: http://example.org/edit/first-post.atom
// Assert header Content-Location: http://example.org/edit/first-post.atom
// Assert header ETag: "555555" (etag response != etag request)
// Assert header Last-Modified: Fri, 25 Jul 2008 14:36:44 -0500
Assert.assertEquals(200, res.getStatus());
Assert.assertEquals(contentType, res.getContentType().toString().trim());
// Assert.assertNotNull( res.getLocation().toString() );
// Assert.assertEquals( "", res.getContentLocation().toString() );
Assert.assertNotNull( res.getHeader( "ETag" ) );
lastModified = res.getLastModified();
Assert.assertNotNull(lastModified);
res.release();
}