You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2013/06/15 10:36:34 UTC

git commit: ISIS-421: Get_thenResponseHeaders_ContentLength_ok RO TCK test

Updated Branches:
  refs/heads/master 7860a8fb0 -> df353872f


ISIS-421: Get_thenResponseHeaders_ContentLength_ok RO TCK test

Signed-off-by: Dan Haywood <da...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/df353872
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/df353872
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/df353872

Branch: refs/heads/master
Commit: df353872f99357c466617d4dbcc4c77fe7e9c8e8
Parents: 7860a8f
Author: Bhargav Golla <bh...@gmail.com>
Authored: Wed Jun 12 00:36:16 2013 +0530
Committer: Dan Haywood <da...@apache.org>
Committed: Sat Jun 15 09:35:08 2013 +0100

----------------------------------------------------------------------
 ...et_thenResponseHeaders_ContentLength_ok.java | 64 +++++++++++++++++++
 ...enResponseHeaders_ContentLength_ok_TODO.java | 42 -------------
 ...et_thenResponseHeaders_ContentLength_ok.java | 66 ++++++++++++++++++++
 ...enResponseHeaders_ContentLength_ok_TODO.java | 42 -------------
 ...et_thenResponseHeaders_ContentLength_ok.java | 65 +++++++++++++++++++
 ...enResponseHeaders_ContentLength_ok_TODO.java | 42 -------------
 ...et_thenResponseHeaders_ContentLength_ok.java | 64 +++++++++++++++++++
 ...enResponseHeaders_ContentLength_ok_TODO.java | 23 -------
 ...et_thenResponseHeaders_ContentLength_ok.java | 64 +++++++++++++++++++
 ...enResponseHeaders_ContentLength_ok_TODO.java | 23 -------
 ...et_thenResponseHeaders_ContentLength_ok.java | 63 +++++++++++++++++++
 ...enResponseHeaders_ContentLength_ok_TODO.java | 23 -------
 ...et_thenResponseHeaders_ContentLength_ok.java | 63 +++++++++++++++++++
 ...enResponseHeaders_ContentLength_ok_TODO.java | 23 -------
 ...et_thenResponseHeaders_ContentLength_ok.java | 65 +++++++++++++++++++
 ...enResponseHeaders_ContentLength_ok_TODO.java | 40 ------------
 16 files changed, 514 insertions(+), 258 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..6363270
--- /dev/null
+++ b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,64 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+
+	@Rule
+    public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+    protected RestfulClient client;
+    private DomainObjectResource domainObjectResource;
+
+    @Before
+    public void setUp() throws Exception {
+        final WebServer webServer = webServerRule.getWebServer();
+        client = new RestfulClient(webServer.getBase());
+        domainObjectResource = client.getDomainObjectResource();
+    }
+
+
+    @Test
+    public void propertyDetails() throws Exception {
+
+        // when
+        final Response collectionResp = domainObjectResource.accessCollection("BSRL", "64", "invisibleCollection");
+        final RestfulResponse<ObjectPropertyRepresentation> collectionJsonResp = RestfulResponse.ofT(collectionResp);
+        assertThat(collectionJsonResp.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok_TODO.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index d89a44e..0000000
--- a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_ContentLength_ok_TODO {
-
-    @Rule
-    public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
-    protected RestfulClient client;
-
-    @Before
-    public void setUp() throws Exception {
-        final WebServer webServer = webServerRule.getWebServer();
-        client = new RestfulClient(webServer.getBase());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..f096dc4
--- /dev/null
+++ b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,66 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+
+	@Rule
+    public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+    protected RestfulClient client;
+    private DomainObjectResource domainObjectResource;
+
+    @Before
+    public void setUp() throws Exception {
+        final WebServer webServer = webServerRule.getWebServer();
+        client = new RestfulClient(webServer.getBase());
+        domainObjectResource = client.getDomainObjectResource();
+    }
+
+
+    @Test
+    public void propertyDetails() throws Exception {
+
+        // when
+        final Response idPropertyResp = domainObjectResource.propertyDetails("org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity","58", "anInt");
+        //given
+        final RestfulResponse<ObjectPropertyRepresentation> idPropertyJsonResp = RestfulResponse.ofT(idPropertyResp);
+        //then
+        assertThat(idPropertyJsonResp.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok_TODO.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 97b45d1..0000000
--- a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenResponseHeaders_ContentLength_ok_TODO {
-
-    @Rule
-    public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
-    protected RestfulClient client;
-
-    @Before
-    public void setUp() throws Exception {
-        final WebServer webServer = webServerRule.getWebServer();
-        client = new RestfulClient(webServer.getBase());
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..76df246
--- /dev/null
+++ b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,65 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+
+    @Rule
+    public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+    protected RestfulClient client;
+    private DomainObjectResource domainObjectResource;
+
+    @Before
+    public void setUp() throws Exception {
+        final WebServer webServer = webServerRule.getWebServer();
+        client = new RestfulClient(webServer.getBase());
+        domainObjectResource = client.getDomainObjectResource();
+    }
+
+    @Test
+    public void ok() throws Exception {
+        // given
+    	final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "67", "contains");
+
+        // when
+    	final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
+
+        // then
+        assertThat(actionPromptJsonResp.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok_TODO.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 5b1facb..0000000
--- a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_ContentLength_ok_TODO {
-
-    @Rule
-    public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
-    protected RestfulClient client;
-
-    @Before
-    public void setUp() throws Exception {
-        final WebServer webServer = webServerRule.getWebServer();
-        client = new RestfulClient(webServer.getBase());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..dc1f374
--- /dev/null
+++ b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,64 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+
+	@Rule
+    public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+    private RestfulClient client;
+    private DomainServiceResource resource;
+
+    @Before
+    public void setUp() throws Exception {
+        client = webServerRule.getClient();
+        resource = client.getDomainServiceResource();
+    }
+
+
+    @Test
+    public void ok() throws Exception {
+        // given
+        final Response resp = resource.services();
+
+        // when
+        final RestfulResponse<ListRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+        // then
+        assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 02afdcf..0000000
--- a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-public class Get_thenResponseHeaders_ContentLength_ok_TODO {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..625e36b
--- /dev/null
+++ b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,64 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+	@Rule
+    public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+    private RestfulClient client;
+    private DomainServiceResource resource;
+
+    @Before
+    public void setUp() throws Exception {
+        client = webServerRule.getClient();
+        
+        resource = client.getDomainServiceResource();
+    }
+
+    @Test
+    public void ok() throws Exception {
+        // given
+        final Response resp = resource.service("JdkValuedEntities");
+
+        // when
+        final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+        
+        // then
+        assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok_TODO.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index a70b6a5..0000000
--- a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-public class Get_thenResponseHeaders_ContentLength_ok_TODO {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_thenResponseHeaders_ContentLength_ok.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..5f3b1ad
--- /dev/null
+++ b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+	
+	@Rule
+    public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+    private RestfulClient client;
+    private HomePageResource resource;
+
+    @Before
+    public void setUp() throws Exception {
+        client = webServerRule.getClient();
+        resource = client.getHomePageResource();
+    }
+
+
+    @Test
+    public void ok() throws Exception {
+        // given
+        final Response resp = resource.homePage();
+
+        // when
+        final RestfulResponse<HomePageRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+        // then
+        assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 1d13dea..0000000
--- a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
-
-public class Get_thenResponseHeaders_ContentLength_ok_TODO {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..8e484c4
--- /dev/null
+++ b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+	@Rule
+    public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+    private RestfulClient client;
+    private UserResource resource;
+
+    @Before
+    public void setUp() throws Exception {
+        client = webServerRule.getClient();
+        resource = client.getUserResource();
+    }
+
+
+    @Test
+    public void ok() throws Exception {
+
+        // given
+        final Response resp = resource.user();
+
+        // when
+        final RestfulResponse<UserRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+        // then
+        assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 948d92f..0000000
--- a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-public class Get_thenResponseHeaders_ContentLength_ok_TODO {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..c4756ab
--- /dev/null
+++ b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,65 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+
+    @Rule
+    public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+    private RestfulClient client;
+    private VersionResource resource;
+
+    @Before
+    public void setUp() throws Exception {
+        final WebServer webServer = webServerRule.getWebServer();
+        client = new RestfulClient(webServer.getBase());
+        
+        resource = client.getVersionResource();
+    }
+    
+    @Test
+    public void ok() throws Exception {
+    	// given
+        final Response resp = resource.version();
+
+        // when
+        final RestfulResponse<VersionRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+        // then
+        assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/df353872/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok_TODO.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 07a9f59..0000000
--- a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenResponseHeaders_ContentLength_ok_TODO {
-
-    @Rule
-    public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
-    protected RestfulClient client;
-
-    @Before
-    public void setUp() throws Exception {
-        final WebServer webServer = webServerRule.getWebServer();
-        client = new RestfulClient(webServer.getBase());
-    }
-}