final String contentType = "application/atom+xml; type=entry";
opts.setContentType(contentType);
// AtomTestCaseUtils.printRequestHeaders( "Post request headers", " ", opts );
IRI colUri = new IRI(providerURI).resolve("customer");
// res = client.post(colUri.toString() + "?test=foo", entry, opts);
ClientResponse res = client.post(colUri.toString(), entry, opts);
// Assert response status code is 201-OK.
// Assert response header Content-Type: application/atom+xml; charset=UTF-8
// Assert response header Location: http://example.org/edit/first-post.atom
// Assert response header Content-Location: http://example.org/edit/first-post.atom
// Assert response header ETag: "e180ee84f0671b1"
// Assert response header Last-Modified: Fri, 25 Jul 2008 14:36:44 -0500
// Assert collection size is 1.
Assert.assertEquals(201, res.getStatus());
Assert.assertEquals(contentType, res.getContentType().toString().trim());
// Assert.assertNotNull( res.getLocation().toString() );
// Assert.assertEquals( "", res.getContentLocation().toString() );
// Save eTag for subsequent tests;
eTag = res.getHeader( "ETag" );
Assert.assertNotNull( eTag );
lastModified = res.getLastModified();
Assert.assertNotNull(lastModified);
}