diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-atom-runtime/src')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java b/sca-java-2.x/trunk/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java index 932344649f..ddec9d4034 100644 --- a/sca-java-2.x/trunk/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java @@ -315,9 +315,23 @@ public class ProviderFeedEntityTagsTestCase { RequestOptions opts = new RequestOptions(); final String contentType = "application/atom+xml"; opts.setContentType(contentType); + opts.setHeader( "If-Modified-Since", dateFormat.format( new Date() )); + + ClientResponse res = client.get(providerURI, opts); + Assert.assertNotNull(res); + try { + // Should return 304 - Feed not provided since feed is unmodified. + Assert.assertEquals(304, res.getStatus()); + } finally { + res.release(); + } + + // Feed request with predicates + opts = new RequestOptions(); + opts.setContentType(contentType); opts.setHeader( "If-Modified-Since", dateFormat.format( previousSecond(lastModified) )); - ClientResponse res = client.get(providerURI, opts); + res = client.get(providerURI, opts); Assert.assertNotNull(res); try { // Should return 200 - Feed provided since feed is changed. |