summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java')
-rw-r--r--sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java20
1 files changed, 17 insertions, 3 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java
index 7ddc193bdc..c2768be986 100644
--- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java
+++ b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java
@@ -187,13 +187,27 @@ public class ProviderFeedEntityTagsTestCase {
@Test
public void testUnmodifiedGetIfModified() throws Exception {
System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedUnmodifiedGetIfModified");
+ // Feed request with predicates
+ 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
- RequestOptions opts = new RequestOptions();
- final String contentType = "application/atom+xml";
+ opts = new RequestOptions();
opts.setContentType(contentType);
opts.setHeader( "If-Modified-Since", dateFormat.format( new Date( 0 ) ));
- ClientResponse res = client.get(providerURI, opts);
+ res = client.get(providerURI, opts);
Assert.assertNotNull(res);
try {
// Should return 200 - Feed provided since feed is changed.