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/07/13 09:56:34 UTC

[2/2] git commit: ISIS-463: todo spec can now also run at unit-level scope.

ISIS-463: todo spec can now also run at unit-level scope.

(still missing... ability to interleave unit- vs integration-level tests)


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

Branch: refs/heads/master
Commit: 880644265fa29a659f6a47e04b0324c81ea9ec0c
Parents: 1e6070f
Author: Dan Haywood <da...@apache.org>
Authored: Sat Jul 13 08:55:40 2013 +0100
Committer: Dan Haywood <da...@apache.org>
Committed: Sat Jul 13 08:55:40 2013 +0100

----------------------------------------------------------------------
 .../applib/services/wrapper/WrapperFactory.java |  43 ++++++
 core/integtestsupport/pom.xml                   |   2 -
 .../ScenarioExecutionForIntegration.java        |  10 +-
 core/specsupport/pom.xml                        |   4 +
 .../scenarios/DomainServiceProvider.java        |   1 +
 .../core/specsupport/scenarios/InMemoryDB.java  |  25 ++--
 .../scenarios/ScenarioExecution.java            |  19 ++-
 .../scenarios/ScenarioExecutionForUnit.java     |  34 ++++-
 .../specsupport/specs/CukeStepDefsAbstract.java |   1 -
 .../integtests/pom.xml                          |   9 ++
 .../java/integration/ToDoSystemInitializer.java |  81 ++++++++++
 .../todoitem/BootstrapIntegrationStepDefs.java  |  37 +++++
 .../specs/todoitem/InMemoryDBForToDoApp.java    |  40 +++++
 .../specs/todoitem/ToDoItemSpecs.feature        |  13 ++
 .../specs/todoitem/ToDoItemSpecs.java           |  37 +++++
 .../specs/todoitem/ToDoItemStepDefs.java        | 147 +++++++++++++++++++
 .../java/integration/tests/ToDoIntegTest.java   |  41 ++++++
 .../tests/actions/ToDoItem_completed.java       |  83 +++++++++++
 .../tests/actions/ToDoItem_duplicate.java       |  72 +++++++++
 .../tests/actions/ToDoItem_notYetCompleted.java |  73 +++++++++
 .../tests/colls/ToDoItem_dependencies_add.java  |  89 +++++++++++
 .../colls/ToDoItem_dependencies_remove.java     |  93 ++++++++++++
 .../tests/props/ToDoItem_attachment.java        |  78 ++++++++++
 .../tests/props/ToDoItem_category.java          |  76 ++++++++++
 .../integration/tests/props/ToDoItem_cost.java  |  92 ++++++++++++
 .../tests/props/ToDoItem_description.java       |  76 ++++++++++
 .../integration/tests/props/ToDoItem_dueBy.java |  95 ++++++++++++
 .../integration/tests/props/ToDoItem_notes.java |  70 +++++++++
 .../tests/props/ToDoItem_ownedBy.java           |  53 +++++++
 .../tests/repo/ToDoItems_finders.java           |  75 ++++++++++
 .../repo/ToDoItems_newToDo_and_delete.java      |  53 +++++++
 .../integration/tests/smoke/ToDoItem_title.java | 109 ++++++++++++++
 .../test/java/integtests/AbstractIntegTest.java |  39 -----
 .../test/java/integtests/ToDoItem_title.java    | 108 --------------
 .../java/integtests/ToDoSystemInitializer.java  |  81 ----------
 .../integtests/actions/ToDoItem_completed.java  |  83 -----------
 .../integtests/actions/ToDoItem_duplicate.java  |  72 ---------
 .../actions/ToDoItem_notYetCompleted.java       |  73 ---------
 .../colls/ToDoItem_dependencies_add.java        |  89 -----------
 .../colls/ToDoItem_dependencies_remove.java     |  93 ------------
 .../integtests/props/ToDoItem_attachment.java   |  78 ----------
 .../integtests/props/ToDoItem_category.java     |  76 ----------
 .../java/integtests/props/ToDoItem_cost.java    |  92 ------------
 .../integtests/props/ToDoItem_description.java  |  76 ----------
 .../java/integtests/props/ToDoItem_dueBy.java   |  95 ------------
 .../java/integtests/props/ToDoItem_notes.java   |  70 ---------
 .../java/integtests/props/ToDoItem_ownedBy.java |  53 -------
 .../java/integtests/repo/ToDoItems_finders.java |  75 ----------
 .../repo/ToDoItems_newToDo_and_delete.java      |  53 -------
 49 files changed, 1702 insertions(+), 1335 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/core/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java b/core/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java
index 8693f30..1fb3c5a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/wrapper/WrapperFactory.java
@@ -19,6 +19,7 @@
 
 package org.apache.isis.applib.services.wrapper;
 
+import java.util.Collections;
 import java.util.List;
 
 import org.apache.isis.applib.annotation.Hidden;
@@ -72,6 +73,48 @@ public interface WrapperFactory {
         EXECUTE, NO_EXECUTE
     }
 
+    WrapperFactory NOOP = new WrapperFactory(){
+
+        @Override
+        public <T> T wrap(T domainObject) {
+            return domainObject;
+        }
+
+        @Override
+        public <T> T wrap(T domainObject, ExecutionMode mode) {
+            return domainObject;
+        }
+
+        @Override
+        public <T> T unwrap(T possibleWrappedDomainObject) {
+            return possibleWrappedDomainObject;
+        }
+
+        @Override
+        public <T> boolean isWrapper(T possibleWrappedDomainObject) {
+            return false;
+        }
+
+        @Override
+        public List<InteractionListener> getListeners() {
+            return Collections.emptyList();
+        }
+
+        @Override
+        public boolean addInteractionListener(InteractionListener listener) {
+            return false;
+        }
+
+        @Override
+        public boolean removeInteractionListener(InteractionListener listener) {
+            return false;
+        }
+
+        @Override
+        public void notifyListeners(InteractionEvent ev) {
+        }
+    };
+
     /**
      * Provides the &quot;wrapper&quot; of the underlying domain object.
      * 

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/core/integtestsupport/pom.xml
----------------------------------------------------------------------
diff --git a/core/integtestsupport/pom.xml b/core/integtestsupport/pom.xml
index 5e90dcd..2343f27 100644
--- a/core/integtestsupport/pom.xml
+++ b/core/integtestsupport/pom.xml
@@ -126,9 +126,7 @@
         <dependency>
             <groupId>org.apache.isis.core</groupId>
             <artifactId>isis-core-wrapper</artifactId>
-            <scope>test</scope>
         </dependency>
 
-
 	</dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/scenarios/ScenarioExecutionForIntegration.java
----------------------------------------------------------------------
diff --git a/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/scenarios/ScenarioExecutionForIntegration.java b/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/scenarios/ScenarioExecutionForIntegration.java
index 7a8efde..f25f903 100644
--- a/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/scenarios/ScenarioExecutionForIntegration.java
+++ b/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/scenarios/ScenarioExecutionForIntegration.java
@@ -17,9 +17,11 @@
 package org.apache.isis.core.integtestsupport.scenarios;
 
 import org.apache.isis.applib.fixtures.InstallableFixture;
+import org.apache.isis.applib.services.wrapper.WrapperFactory;
 import org.apache.isis.core.integtestsupport.IsisSystemForTest;
 import org.apache.isis.core.specsupport.scenarios.DomainServiceProvider;
 import org.apache.isis.core.specsupport.scenarios.ScenarioExecution;
+import org.apache.isis.core.wrapper.WrapperFactoryDefault;
 
 
 /**
@@ -37,10 +39,16 @@ public class ScenarioExecutionForIntegration extends ScenarioExecution  {
     private IsisSystemForTest isft;
 
     public ScenarioExecutionForIntegration() {
-        super(IsisSystemForTest.get());
+        super(IsisSystemForTest.get(), new WrapperFactoryDefault());
         this.isft = (IsisSystemForTest) dsp;
     }
 
+    // //////////////////////////////////////
+
+    private WrapperFactory wrapperFactory = new WrapperFactoryDefault();
+    public WrapperFactory wrapperFactory() {
+        return wrapperFactory;
+    }
 
     // //////////////////////////////////////
 

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/core/specsupport/pom.xml
----------------------------------------------------------------------
diff --git a/core/specsupport/pom.xml b/core/specsupport/pom.xml
index 99a19da..9b6cbd7 100644
--- a/core/specsupport/pom.xml
+++ b/core/specsupport/pom.xml
@@ -65,6 +65,10 @@
             <groupId>org.apache.isis.core</groupId>
             <artifactId>isis-core-applib</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-wrapper</artifactId>
+        </dependency>
 
         <dependency>
            <groupId>junit</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/DomainServiceProvider.java
----------------------------------------------------------------------
diff --git a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/DomainServiceProvider.java b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/DomainServiceProvider.java
index e630f39..d5dd597 100644
--- a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/DomainServiceProvider.java
+++ b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/DomainServiceProvider.java
@@ -17,6 +17,7 @@
 package org.apache.isis.core.specsupport.scenarios;
 
 import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.applib.services.wrapper.WrapperFactory;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/InMemoryDB.java
----------------------------------------------------------------------
diff --git a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/InMemoryDB.java b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/InMemoryDB.java
index ded1d9c..6c8d266 100644
--- a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/InMemoryDB.java
+++ b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/InMemoryDB.java
@@ -95,35 +95,38 @@ public class InMemoryDB {
     
     private Map<InMemoryDB.EntityId, Object> objectsById = Maps.newHashMap();
     
-    private Object get(Class<?> cls, final String id) {
-        while(cls != null) {
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    public <T> T get(final Class<T> cls, final String id) {
+        Class type = cls;
+        while(type != null) {
             // search for this class and all superclasses
             final InMemoryDB.EntityId entityId = new EntityId(cls, id);
             final Object object = objectsById.get(entityId);
             if(object != null) {
-                return object;
+                return (T) object;
             }
-            cls = cls.getSuperclass();
+            type = type.getSuperclass();
         }
         return null;
     }
 
-    private Object getElseCreate(Class<?> cls, final String id) {
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    public <T> T getElseCreate(final Class<T> cls, final String id) {
         final Object object = get(cls, id);
         if(object != null) { 
-            return object;
+            return (T) object;
         }
-        Object obj;
-        obj = instantiateAndInject(cls);
+        Object obj = instantiateAndInject(cls);
         init(obj, id);
         
+        Class type = cls;
         // put for this class and all superclasses
-        while(cls != null) {
+        while(type != null) {
             final InMemoryDB.EntityId entityId = new EntityId(cls, id);
             objectsById.put(entityId, obj);
-            cls = cls.getSuperclass();
+            type = type.getSuperclass();
         }
-            return obj;
+        return (T) obj;
     }
 
     private Object instantiateAndInject(Class<?> cls)  {

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecution.java
----------------------------------------------------------------------
diff --git a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecution.java b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecution.java
index 741d54a..f39fef2 100644
--- a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecution.java
+++ b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecution.java
@@ -28,6 +28,7 @@ import org.jmock.internal.ExpectationBuilder;
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.applib.fixtures.InstallableFixture;
 import org.apache.isis.applib.services.wrapper.WrapperFactory;
+import org.apache.isis.core.wrapper.WrapperFactoryDefault;
 
 
 /**
@@ -71,9 +72,11 @@ public abstract class ScenarioExecution {
     // //////////////////////////////////////
 
     protected final DomainServiceProvider dsp;
+    private WrapperFactory wrapperFactory;
     
-    protected ScenarioExecution(final DomainServiceProvider dsp) {
+    protected ScenarioExecution(final DomainServiceProvider dsp, final WrapperFactory wrapperFactory) {
         this.dsp = dsp;
+        this.wrapperFactory = wrapperFactory;
         current.set(this);
     }
 
@@ -83,7 +86,11 @@ public abstract class ScenarioExecution {
      * 
      * @throws IllegalStateException if not available
      */
+    @SuppressWarnings("unchecked")
     public <T> T service(Class<T> cls) {
+        if(WrapperFactory.class.isAssignableFrom(cls)) {
+            return (T) wrapperFactory();
+        }
         final T service = dsp.getService(cls);
         if(service == null) {
             throw new IllegalStateException(
@@ -109,14 +116,9 @@ public abstract class ScenarioExecution {
         return container;
     }
 
-    /**
-     * Convenience method, returning the {@link WrapperFactory} domain service,
-     * first ensuring that it is available.
-     * 
-     * @throws IllegalStateException if not available
-     */
+    
     public WrapperFactory wrapperFactory() {
-        return service(WrapperFactory.class);
+        return wrapperFactory;
     }
 
 
@@ -207,6 +209,7 @@ public abstract class ScenarioExecution {
 
     public void put(String type, String id, Object value) {
         objectByVariableId.put(new VariableId(type, id), value);
+        objectsById.put(id, value);
         mostRecent.put(type, value);
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecutionForUnit.java
----------------------------------------------------------------------
diff --git a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecutionForUnit.java b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecutionForUnit.java
index c8e0531..6d35214 100644
--- a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecutionForUnit.java
+++ b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecutionForUnit.java
@@ -31,6 +31,8 @@ import org.jmock.internal.ExpectationBuilder;
 import org.jmock.lib.legacy.ClassImposteriser;
 
 import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.applib.services.wrapper.WrapperFactory;
+import org.apache.isis.core.wrapper.WrapperFactoryDefault;
 
 /**
  * An implementation of {@link ScenarioExecution} with which uses JMock to provide
@@ -48,11 +50,21 @@ public class ScenarioExecutionForUnit extends ScenarioExecution {
         private DomainObjectContainer mockContainer = null;
         private final Map<Class<?>, Object> mocks = Maps.newHashMap();
         
-        private final Mockery context = new Mockery() {{
-            setImposteriser(ClassImposteriser.INSTANCE);
-        }};
+        private Mockery context;
+
         private ScenarioExecution scenarioExecution;
 
+        DomainServiceProviderMockery() {
+            init();
+        }
+
+        private void init() {
+            context = new Mockery() {{
+                setImposteriser(ClassImposteriser.INSTANCE);
+            }};
+            mocks.clear();
+        }
+
         @Override
         public DomainObjectContainer getContainer() {
             if(mockContainer == null) {
@@ -99,6 +111,15 @@ public class ScenarioExecutionForUnit extends ScenarioExecution {
             this.scenarioExecution = scenarioExecution;
             return this;
         }
+
+        /**
+         * not API 
+         */
+        void assertIsSatisfied() {
+            mockery().assertIsSatisfied();
+            // discard all existing mocks and mockery, to start again.
+            init();
+        }
     }
 
     private final ScenarioExecutionForUnit.DomainServiceProviderMockery dspm;
@@ -107,10 +128,11 @@ public class ScenarioExecutionForUnit extends ScenarioExecution {
         this(new DomainServiceProviderMockery());
     }
     private ScenarioExecutionForUnit(ScenarioExecutionForUnit.DomainServiceProviderMockery dspm) {
-        super(dspm);
+        super(dspm, WrapperFactory.NOOP);
         this.dspm = dspm.init(this);
     }
-    
+
+
     // //////////////////////////////////////
 
     public void checking(ExpectationBuilder expectations) {
@@ -118,7 +140,7 @@ public class ScenarioExecutionForUnit extends ScenarioExecution {
     }
     
     public void assertIsSatisfied() {
-        dspm.mockery().assertIsSatisfied();
+        dspm.assertIsSatisfied();
     }
     
     public Sequence sequence(String name) {

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/core/specsupport/src/main/java/org/apache/isis/core/specsupport/specs/CukeStepDefsAbstract.java
----------------------------------------------------------------------
diff --git a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/specs/CukeStepDefsAbstract.java b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/specs/CukeStepDefsAbstract.java
index 2e497ac..f87574a 100644
--- a/core/specsupport/src/main/java/org/apache/isis/core/specsupport/specs/CukeStepDefsAbstract.java
+++ b/core/specsupport/src/main/java/org/apache/isis/core/specsupport/specs/CukeStepDefsAbstract.java
@@ -70,7 +70,6 @@ public abstract class CukeStepDefsAbstract {
      */
     public void put(String type, String id, Object value) {
         scenarioExecution().put(type, id, value);
-        
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/pom.xml b/example/application/quickstart_wicket_restful_jdo/integtests/pom.xml
index 71a54ff..abaaea2 100644
--- a/example/application/quickstart_wicket_restful_jdo/integtests/pom.xml
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/pom.xml
@@ -67,6 +67,15 @@
             <groupId>org.apache.isis.core</groupId>
             <artifactId>isis-core-integtestsupport</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-specsupport</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>hamcrest-library</artifactId>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.isis.core</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/ToDoSystemInitializer.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/ToDoSystemInitializer.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/ToDoSystemInitializer.java
new file mode 100644
index 0000000..165f8b9
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/ToDoSystemInitializer.java
@@ -0,0 +1,81 @@
+/*
+ *  Copyright 2012-2013 Eurocommercial Properties NV
+ *
+ *  Licensed 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 integration;
+
+import objstore.jdo.todo.ToDoItemsJdo;
+
+import org.apache.log4j.Level;
+
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.commons.config.IsisConfigurationDefault;
+import org.apache.isis.core.integtestsupport.IsisSystemForTest;
+import org.apache.isis.core.wrapper.WrapperFactoryDefault;
+import org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore;
+import org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller;
+import org.apache.isis.objectstore.jdo.datanucleus.service.support.IsisJdoSupportImpl;
+import org.apache.isis.objectstore.jdo.service.RegisterEntities;
+
+/**
+ * Holds an instance of an {@link IsisSystemForTest} as a {@link ThreadLocal} on the current thread,
+ * initialized with ToDo app's domain services. 
+ */
+public class ToDoSystemInitializer {
+    
+    private ToDoSystemInitializer(){}
+
+    public static IsisSystemForTest initIsft() {
+        IsisSystemForTest isft = IsisSystemForTest.getElseNull();
+        if(isft == null) {
+            isft = new ToDoSystemBuilder().build().setUpSystem();
+            IsisSystemForTest.set(isft);
+        }
+        return isft;
+    }
+
+    private static class ToDoSystemBuilder extends IsisSystemForTest.Builder {
+
+        public ToDoSystemBuilder() {
+            //withFixtures( ... reference data fixtures ...); // if we had any...
+            withLoggingAt(Level.INFO);
+            with(testConfiguration());
+            with(new DataNucleusPersistenceMechanismInstaller());
+            
+            withServices(
+                    new ToDoItemsJdo(),
+                    new WrapperFactoryDefault(),
+                    new RegisterEntities(),
+                    new IsisJdoSupportImpl()
+                    );
+        }
+
+        private IsisConfiguration testConfiguration() {
+            final IsisConfigurationDefault testConfiguration = new IsisConfigurationDefault();
+
+            testConfiguration.add("isis.persistor.datanucleus.RegisterEntities.packagePrefix", "dom");
+            testConfiguration.add("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL", "jdbc:hsqldb:mem:test");
+            
+            testConfiguration.add("isis.persistor.datanucleus.impl.datanucleus.defaultInheritanceStrategy", "TABLE_PER_CLASS");
+            testConfiguration.add(DataNucleusObjectStore.INSTALL_FIXTURES_KEY , "true");
+            
+            testConfiguration.add("isis.persistor.datanucleus.impl.datanucleus.cache.level2.type","none");
+
+            return testConfiguration;
+        }
+
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/BootstrapIntegrationStepDefs.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/BootstrapIntegrationStepDefs.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/BootstrapIntegrationStepDefs.java
new file mode 100644
index 0000000..2ad7014
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/BootstrapIntegrationStepDefs.java
@@ -0,0 +1,37 @@
+/*
+ *  Copyright 2012-2013 Eurocommercial Properties NV
+ *
+ *  Licensed 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 integration.specs.todoitem;
+
+import integration.ToDoSystemInitializer;
+import cucumber.api.java.Before;
+
+import org.apache.log4j.PropertyConfigurator;
+
+import org.apache.isis.core.specsupport.scenarios.ScenarioExecutionScope;
+import org.apache.isis.core.specsupport.specs.CukeStepDefsAbstract;
+
+public class BootstrapIntegrationStepDefs extends CukeStepDefsAbstract {
+
+    @Before(value={"@integration"}, order=100)
+    public void beforeScenarioIntegrationScope() {
+        PropertyConfigurator.configure("logging.properties");
+        ToDoSystemInitializer.initIsft();
+        
+        before(ScenarioExecutionScope.INTEGRATION);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/InMemoryDBForToDoApp.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/InMemoryDBForToDoApp.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/InMemoryDBForToDoApp.java
new file mode 100644
index 0000000..af09a8d
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/InMemoryDBForToDoApp.java
@@ -0,0 +1,40 @@
+/**
+ *  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 integration.specs.todoitem;
+
+import dom.todo.ToDoItem;
+
+import org.apache.isis.core.specsupport.scenarios.InMemoryDB;
+import org.apache.isis.core.specsupport.scenarios.ScenarioExecution;
+
+public class InMemoryDBForToDoApp extends InMemoryDB {
+    
+    public InMemoryDBForToDoApp(ScenarioExecution scenarioExecution) {
+        super(scenarioExecution);
+    }
+    
+    /**
+     * Hook to initialize if possible.
+     */
+    @Override
+    protected void init(Object obj, String str) {
+        if(obj instanceof ToDoItem) {
+            ToDoItem toDoItem = (ToDoItem) obj;
+            toDoItem.setDescription(str);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemSpecs.feature
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemSpecs.feature b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemSpecs.feature
new file mode 100644
index 0000000..da53c6f
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemSpecs.feature
@@ -0,0 +1,13 @@
+Feature: Find And Complete ToDo Items
+
+  # can either run at unit-level scope or integration-level scope
+  
+  #@integration
+  @unit
+  Scenario: Todo items once completed are no longer listed
+    Given there are a number of incomplete ToDo items
+    When  I choose the first one
+    And   mark it as complete
+    Then  the item is no longer listed as incomplete 
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemSpecs.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemSpecs.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemSpecs.java
new file mode 100644
index 0000000..743c7a0
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemSpecs.java
@@ -0,0 +1,37 @@
+/*
+ *  Copyright 2012-2013 Eurocommercial Properties NV
+ *
+ *  Licensed 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 integration.specs.todoitem;
+
+import cucumber.api.junit.Cucumber;
+
+import org.junit.runner.RunWith;
+
+
+/**
+ * Runs all scenarios in corresponding <tt>.feature</tt> file. 
+ */
+@RunWith(Cucumber.class)
+@Cucumber.Options(
+        format = {
+                "html:target/cucumber-html-report"
+        },
+        strict = true,
+        tags = { "~@backlog" })
+public class ToDoItemSpecs {
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemStepDefs.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemStepDefs.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemStepDefs.java
new file mode 100644
index 0000000..b97e05e
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/specs/todoitem/ToDoItemStepDefs.java
@@ -0,0 +1,147 @@
+/*
+ *  Copyright 2012-2013 Eurocommercial Properties NV
+ *
+ *  Licensed 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 integration.specs.todoitem;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+import cucumber.api.java.After;
+import cucumber.api.java.Before;
+import cucumber.api.java.en.Given;
+import cucumber.api.java.en.Then;
+import cucumber.api.java.en.When;
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.jmock.Expectations;
+import org.jmock.Mockery;
+
+import org.apache.isis.core.specsupport.scenarios.InMemoryDB;
+import org.apache.isis.core.specsupport.scenarios.ScenarioExecutionScope;
+import org.apache.isis.core.specsupport.specs.CukeStepDefsAbstract;
+
+public class ToDoItemStepDefs extends CukeStepDefsAbstract {
+
+
+    // //////////////////////////////////////
+    
+    private List<ToDoItem> items;
+
+    @Before({"@unit"})
+    public void beforeScenarioUnitScope() {
+        before(ScenarioExecutionScope.UNIT);
+    }
+
+    @Before({"@integration"})
+    public void beforeScenarioIntegrationScope() {
+        before(ScenarioExecutionScope.INTEGRATION);
+    }
+
+    @After
+    public void afterScenario(cucumber.api.Scenario sc) {
+        after(sc);
+    }
+
+    // //////////////////////////////////////
+    
+    
+
+    @Before(value={"@unit"}, order=20000)
+    public void unitFixtures() throws Throwable {
+        final InMemoryDB inMemoryDB = new InMemoryDBForToDoApp(this.scenarioExecution());
+        final ToDoItem t1 = inMemoryDB.getElseCreate(ToDoItem.class, "Write blog post");
+        final ToDoItem t2 = inMemoryDB.getElseCreate(ToDoItem.class, "Pick up bread");
+        items = Arrays.asList(t1, t2);
+    }
+
+    private static ArrayList<ToDoItem> notYetComplete(List<ToDoItem> items) {
+        return Lists.newArrayList(Iterables.filter(items, new Predicate<ToDoItem>(){
+
+            @Override
+            public boolean apply(ToDoItem input) {
+                return !input.isComplete();
+            }
+        }));
+    }
+
+    @Before(value={"@integration"}, order=20000)
+    public void integrationFixtures() throws Throwable {
+        scenarioExecution().install(new ToDoItemsFixture());
+    }
+    
+    // //////////////////////////////////////
+    
+
+    @Given("^there are a number of incomplete ToDo items$")
+    public void there_are_a_number_of_incomplete_ToDo_items() throws Throwable {
+        checking(new Expectations() {
+            {
+                allowing(service(ToDoItems.class)).notYetComplete();
+                will(returnValue(notYetComplete(items)));
+            }
+        });
+
+        final List<ToDoItem> notYetComplete = service(ToDoItems.class).notYetComplete();
+        assertThat(notYetComplete.isEmpty(), is(false));
+        put("list", "notYetComplete", notYetComplete);
+    }
+    
+    @When("^I choose the first one$")
+    public void I_choose_the_first_one() throws Throwable {
+        @SuppressWarnings("unchecked")
+        List<ToDoItem> notYetComplete = get(null, "notYetComplete", List.class);
+        assertThat(notYetComplete.isEmpty(), is(false));
+        
+        put("todo", "firstToDo", notYetComplete.get(0));
+    }
+    
+    @When("^mark it as complete$")
+    public void mark_it_as_complete() throws Throwable {
+        ToDoItem toDoItem = get(null, "firstToDo", ToDoItem.class);
+        wrap(toDoItem).completed();
+    }
+    
+    @Then("^the item is no longer listed as incomplete$")
+    public void the_item_is_no_longer_listed_as_incomplete() throws Throwable {
+        assertIsSatisfied();
+        Mockery m;
+        
+        final ArrayList<ToDoItem> notYetCompleteItems = notYetComplete(items);
+        checking(new Expectations() {
+            {
+                oneOf(service(ToDoItems.class)).notYetComplete();
+                will(returnValue(notYetCompleteItems));
+            }
+        });
+
+        final List<ToDoItem> notYetComplete = service(ToDoItems.class).notYetComplete();
+        ToDoItem toDoItem = get(null, "firstToDo", ToDoItem.class);
+        
+        assertThat(notYetComplete.contains(toDoItem), is(false));
+    }
+    
+    
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/ToDoIntegTest.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/ToDoIntegTest.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/ToDoIntegTest.java
new file mode 100644
index 0000000..617418f
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/ToDoIntegTest.java
@@ -0,0 +1,41 @@
+/*
+ *  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 integration.tests;
+
+import integration.ToDoSystemInitializer;
+
+import org.apache.log4j.PropertyConfigurator;
+import org.junit.BeforeClass;
+
+import org.apache.isis.core.integtestsupport.IntegrationTestAbstract;
+import org.apache.isis.core.integtestsupport.scenarios.ScenarioExecutionForIntegration;
+
+public abstract class ToDoIntegTest extends IntegrationTestAbstract {
+
+    
+    @BeforeClass
+    public static void initClass() {
+        PropertyConfigurator.configure("logging.properties");
+        ToDoSystemInitializer.initIsft();
+        
+        // instantiating will install onto ThreadLocal
+        new ScenarioExecutionForIntegration();
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_completed.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_completed.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_completed.java
new file mode 100644
index 0000000..e2e8815
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_completed.java
@@ -0,0 +1,83 @@
+/*
+ *  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 integration.tests.actions;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class ToDoItem_completed extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+
+    @Before
+    public void setUp() throws Exception {
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> all = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(all.get(0));
+    }
+
+
+    @Test
+    public void happyCase() throws Exception {
+        
+        // given
+        assertThat(toDoItem.isComplete(), is(false));
+        
+        // when
+        toDoItem.completed();
+        
+        // then
+        assertThat(toDoItem.isComplete(), is(true));
+    }
+
+
+    @Test
+    public void cannotCompleteIfAlreadyCompleted() throws Exception {
+        
+        // given
+        unwrap(toDoItem).setComplete(true);
+
+        // when, then should fail
+        expectedExceptions.expectMessage("Already completed");
+        toDoItem.completed();
+    }
+
+
+    @Test
+    public void cannotSetPropertyDirectly() throws Exception {
+        
+        // given
+
+        // when, then should fail
+        expectedExceptions.expectMessage("Always disabled");
+        toDoItem.setComplete(true);
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_duplicate.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_duplicate.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_duplicate.java
new file mode 100644
index 0000000..71b228a
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_duplicate.java
@@ -0,0 +1,72 @@
+/*
+ *  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 integration.tests.actions;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.joda.time.LocalDate;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.isis.applib.clock.Clock;
+
+public class ToDoItem_duplicate extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+    private ToDoItem duplicateToDoItem;
+
+    @Before
+    public void setUp() throws Exception {
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> all = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(all.get(0));
+    }
+
+    @Test
+    public void happyCase() throws Exception {
+        
+        // given
+        final LocalDate todaysDate = Clock.getTimeAsLocalDate();
+        toDoItem.setDueBy(todaysDate);
+        toDoItem.setCost(new BigDecimal("123.45"));
+        
+        duplicateToDoItem = toDoItem.duplicate(
+                unwrap(toDoItem).default0Duplicate(), 
+                unwrap(toDoItem).default1Duplicate(),
+                unwrap(toDoItem).default2Duplicate(),
+                new BigDecimal("987.65"));
+        
+        // then
+        assertThat(duplicateToDoItem.getDescription(), is(toDoItem.getDescription() + " - Copy"));
+        assertThat(duplicateToDoItem.getCategory(), is(toDoItem.getCategory()));
+        assertThat(duplicateToDoItem.getDueBy(), is(todaysDate));
+        assertThat(duplicateToDoItem.getCost(), is(new BigDecimal("987.65")));
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_notYetCompleted.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_notYetCompleted.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_notYetCompleted.java
new file mode 100644
index 0000000..0464cd9
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/actions/ToDoItem_notYetCompleted.java
@@ -0,0 +1,73 @@
+/*
+ *  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 integration.tests.actions;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ToDoItem_notYetCompleted extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+
+    @Before
+    public void setUp() throws Exception {
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> all = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(all.get(0));
+    }
+
+
+    @Test
+    public void happyCase() throws Exception {
+        
+        // given
+        unwrap(toDoItem).setComplete(true);
+        
+        // when
+        toDoItem.notYetCompleted();
+        
+        // then
+        assertThat(toDoItem.isComplete(), is(false));
+    }
+
+
+    @Test
+    public void cannotUndoIfNotYetCompleted() throws Exception {
+        
+        // given
+        assertThat(toDoItem.isComplete(), is(false));
+
+        // when, then should fail
+        expectedExceptions.expectMessage("Not yet completed");
+        toDoItem.notYetCompleted();
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/colls/ToDoItem_dependencies_add.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/colls/ToDoItem_dependencies_add.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/colls/ToDoItem_dependencies_add.java
new file mode 100644
index 0000000..d66c3fa
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/colls/ToDoItem_dependencies_add.java
@@ -0,0 +1,89 @@
+/*
+ *  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 integration.tests.colls;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ToDoItem_dependencies_add extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+    private ToDoItem otherToDoItem;
+    
+
+    @Before
+    public void setUp() throws Exception {
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> items = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(items.get(0));
+        otherToDoItem = items.get(1); // wrapping this seems to trip up cglib :-(
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        unwrap(toDoItem).getDependencies().clear();
+    }
+
+    @Test
+    public void happyCase() throws Exception {
+
+        // given
+        assertThat(toDoItem.getDependencies().size(), is(0));
+        
+        // when
+        toDoItem.add(otherToDoItem);
+        
+        // then
+        assertThat(toDoItem.getDependencies().size(), is(1));
+        assertThat(toDoItem.getDependencies().first(), is(unwrap(otherToDoItem)));
+    }
+
+
+    @Test
+    public void cannotDependOnSelf() throws Exception {
+
+        // when, then
+        expectedExceptions.expectMessage("Can't set up a dependency to self");
+        toDoItem.add(toDoItem);
+    }
+
+    @Test
+    public void cannotAddDependencyIfComplete() throws Exception {
+
+        // given
+        unwrap(toDoItem).setComplete(true);
+        
+        // when, then
+        expectedExceptions.expectMessage("Cannot add dependencies for items that are complete");
+        toDoItem.add(otherToDoItem);
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/colls/ToDoItem_dependencies_remove.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/colls/ToDoItem_dependencies_remove.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/colls/ToDoItem_dependencies_remove.java
new file mode 100644
index 0000000..f9bfec0
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/colls/ToDoItem_dependencies_remove.java
@@ -0,0 +1,93 @@
+/*
+ *  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 integration.tests.colls;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ToDoItem_dependencies_remove extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+    private ToDoItem otherToDoItem;
+    private ToDoItem yetAnotherToDoItem;
+    
+
+    @Before
+    public void setUp() throws Exception {
+        // given
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> items = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(items.get(0));
+        otherToDoItem = items.get(1); // wrapping this seems to trip up cglib :-(
+        yetAnotherToDoItem = items.get(2); // wrapping this seems to trip up cglib :-(
+        
+        toDoItem.add(otherToDoItem);
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        unwrap(toDoItem).getDependencies().clear();
+    }
+
+    @Test
+    public void happyCase() throws Exception {
+
+        // given
+        assertThat(toDoItem.getDependencies().size(), is(1));
+        
+        // when
+        toDoItem.remove(otherToDoItem);
+        
+        // then
+        assertThat(toDoItem.getDependencies().size(), is(0));
+    }
+
+
+    @Test
+    public void cannotRemoveItemIfNotADepedndency() throws Exception {
+
+        // when, then
+        expectedExceptions.expectMessage("Not a dependency");
+        toDoItem.remove(yetAnotherToDoItem);
+    }
+
+    @Test
+    public void cannotRemoveDependencyIfComplete() throws Exception {
+
+        // given
+        unwrap(toDoItem).setComplete(true);
+        
+        // when, then
+        expectedExceptions.expectMessage("Cannot remove dependencies for items that are complete");
+        toDoItem.remove(otherToDoItem);
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_attachment.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_attachment.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_attachment.java
new file mode 100644
index 0000000..eec163c
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_attachment.java
@@ -0,0 +1,78 @@
+/*
+ *  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 integration.tests.props;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.nio.charset.Charset;
+import java.util.List;
+
+import javax.activation.MimeType;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.isis.applib.value.Blob;
+
+public class ToDoItem_attachment extends ToDoIntegTest {
+
+
+    private ToDoItem toDoItem;
+
+    @Before
+    public void setUp() throws Exception {
+        
+        scenarioExecution().install(new ToDoItemsFixture());
+        
+        final List<ToDoItem> all = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(all.get(0));
+    }
+
+    @Test
+    public void happyCase() throws Exception {
+        
+        byte[] bytes = "{\"foo\": \"bar\"}".getBytes(Charset.forName("UTF-8"));
+        final Blob newAttachment = new Blob("myfile.json", new MimeType("application/json"), bytes);
+        
+        // when
+        toDoItem.setAttachment(newAttachment);
+        
+        // then
+        assertThat(toDoItem.getAttachment(), is(newAttachment));
+    }
+
+    @Test
+    public void canBeNull() throws Exception {
+        
+        // when
+        toDoItem.setAttachment((Blob)null);
+        
+        // then
+        assertThat(toDoItem.getAttachment(), is((Blob)null));
+    }
+
+    
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_category.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_category.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_category.java
new file mode 100644
index 0000000..e65218a
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_category.java
@@ -0,0 +1,76 @@
+/*
+ *  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 integration.tests.props;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import dom.todo.ToDoItem.Category;
+import fixture.todo.ToDoItemsFixture;
+
+import org.joda.time.LocalDate;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.isis.applib.clock.Clock;
+
+public class ToDoItem_category extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+
+    @Before
+    public void setUp() throws Exception {
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> all = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(all.get(0));
+    }
+
+    @Test
+    public void happyCase() throws Exception {
+        
+        // when
+        toDoItem.setCategory(Category.Professional);
+        
+        // then
+        assertThat(toDoItem.getCategory(), is(Category.Professional));
+        
+        // when
+        toDoItem.setCategory(Category.Domestic);
+        
+        // then
+        assertThat(toDoItem.getCategory(), is(Category.Domestic));
+    }
+
+
+    @Test
+    public void cannotBeNull() throws Exception {
+        
+        // when, then
+        expectedExceptions.expectMessage("Mandatory");
+        toDoItem.setCategory(null);
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_cost.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_cost.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_cost.java
new file mode 100644
index 0000000..6da6ff1
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_cost.java
@@ -0,0 +1,92 @@
+/*
+ *  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 integration.tests.props;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class ToDoItem_cost extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+    private BigDecimal cost;
+
+    @Before
+    public void setUp() throws Exception {
+        // given
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> all = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(all.get(0));
+        cost = toDoItem.getCost();
+    }
+
+    @Test
+    public void happyCaseUsingProperty() throws Exception {
+        
+        final BigDecimal newCost = new BigDecimal("123.45");
+        
+        // when
+        toDoItem.setCost(newCost);
+        
+        // then
+        assertThat(toDoItem.getCost(), is(newCost));
+    }
+
+    @Test
+    public void happyCaseUsingAction() throws Exception {
+        
+        final BigDecimal newCost = new BigDecimal("123.45");
+        
+        // when
+        toDoItem.updateCost(newCost);
+        
+        // then
+        assertThat(toDoItem.getCost(), is(newCost));
+    }
+    
+    @Test
+    public void canBeNull() throws Exception {
+        
+        // when
+        toDoItem.setCost((BigDecimal)null);
+        
+        // then
+        assertThat(toDoItem.getCost(), is((BigDecimal)null));
+    }
+
+    @Test
+    public void defaultForAction() throws Exception {
+        
+        // then
+        assertThat(unwrap(toDoItem).default0UpdateCost(), is(cost));
+    }
+    
+    
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_description.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_description.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_description.java
new file mode 100644
index 0000000..591ed3a
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_description.java
@@ -0,0 +1,76 @@
+/*
+ *  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 integration.tests.props;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class ToDoItem_description extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+
+    @Before
+    public void setUp() throws Exception {
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> all = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(all.get(0));
+    }
+
+    @Test
+    public void happyCase() throws Exception {
+        
+        // given
+        assertThat(toDoItem.getDescription(), is("Buy bread"));
+        
+        // when
+        toDoItem.setDescription("Buy bread and butter");
+        
+        // then
+        assertThat(toDoItem.getDescription(), is("Buy bread and butter"));
+    }
+
+
+    @Test
+    public void failsRegex() throws Exception {
+        
+        // when
+        expectedExceptions.expectMessage("Doesn't match pattern");
+        toDoItem.setDescription("exclamation marks are not allowed!!!");
+    }
+
+    @Test
+    public void cannotBeNull() throws Exception {
+        
+        // when, then
+        expectedExceptions.expectMessage("Mandatory");
+        toDoItem.setDescription(null);
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_dueBy.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_dueBy.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_dueBy.java
new file mode 100644
index 0000000..eca2da9
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_dueBy.java
@@ -0,0 +1,95 @@
+/*
+ *  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 integration.tests.props;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.joda.time.LocalDate;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.isis.applib.clock.Clock;
+
+public class ToDoItem_dueBy extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+
+    @Before
+    public void setUp() throws Exception {
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> all = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(all.get(0));
+    }
+
+    @Test
+    public void happyCase() throws Exception {
+        
+        // when
+        final LocalDate fiveDaysFromNow = Clock.getTimeAsLocalDate().plusDays(5);
+        toDoItem.setDueBy(fiveDaysFromNow);
+        
+        // then
+        assertThat(toDoItem.getDueBy(), is(fiveDaysFromNow));
+    }
+
+
+    @Test
+    public void canBeNull() throws Exception {
+        
+        // when
+        toDoItem.setDueBy((LocalDate)null);
+        
+        // then
+        assertThat(toDoItem.getDueBy(), is((LocalDate)null));
+    }
+
+    @Test
+    public void canBeUpToSixDaysInPast() throws Exception {
+        
+        final LocalDate sixDaysAgo = Clock.getTimeAsLocalDate().plusDays(-6);
+
+        // when
+        toDoItem.setDueBy(sixDaysAgo);
+        
+        // then
+        assertThat(toDoItem.getDueBy(), is(sixDaysAgo));
+    }
+
+
+    @Test
+    public void cannotBeMoreThanSixDaysInPast() throws Exception {
+        
+        final LocalDate sevenDaysAgo = Clock.getTimeAsLocalDate().plusDays(-7);
+        
+        // when, then
+        expectedExceptions.expectMessage("Due by date cannot be more than one week old");
+        toDoItem.setDueBy(sevenDaysAgo);
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_notes.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_notes.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_notes.java
new file mode 100644
index 0000000..e3cedca
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_notes.java
@@ -0,0 +1,70 @@
+/*
+ *  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 integration.tests.props;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class ToDoItem_notes extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+
+    @Before
+    public void setUp() throws Exception {
+        // given
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> all = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(all.get(0));
+    }
+
+    @Test
+    public void happyCase() throws Exception {
+        
+        final String newNotes = "Lorem ipsum yada yada";
+        
+        // when
+        toDoItem.setNotes(newNotes);
+        
+        // then
+        assertThat(toDoItem.getNotes(), is(newNotes));
+    }
+
+    @Test
+    public void canBeNull() throws Exception {
+        
+        // when
+        toDoItem.setNotes((String)null);
+        
+        // then
+        assertThat(toDoItem.getNotes(), is((String)null));
+    }
+
+    
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_ownedBy.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_ownedBy.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_ownedBy.java
new file mode 100644
index 0000000..ccb8275
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItem_ownedBy.java
@@ -0,0 +1,53 @@
+/*
+ *  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 integration.tests.props;
+
+import integration.tests.ToDoIntegTest;
+
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class ToDoItem_ownedBy extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+
+    @Before
+    public void setUp() throws Exception {
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> all = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(all.get(0));
+    }
+
+    @Test
+    public void cannotModify() throws Exception {
+        
+        // when, then
+        expectedExceptions.expectMessage("Always hidden");
+        toDoItem.setOwnedBy("other");
+    }
+
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/repo/ToDoItems_finders.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/repo/ToDoItems_finders.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/repo/ToDoItems_finders.java
new file mode 100644
index 0000000..1d98c70
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/repo/ToDoItems_finders.java
@@ -0,0 +1,75 @@
+/*
+ *  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 integration.tests.repo;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ToDoItems_finders extends ToDoIntegTest {
+
+    private int notYetCompletedSize;
+    private int completedSize;
+
+    @Before
+    public void setUp() throws Exception {
+        scenarioExecution().install(new ToDoItemsFixture());
+
+        final List<ToDoItem> notYetCompleteItems = wrap(service(ToDoItems.class)).notYetComplete();
+        final List<ToDoItem> completedItems = wrap(service(ToDoItems.class)).complete();
+        
+        notYetCompletedSize = notYetCompleteItems.size();
+        completedSize = completedItems.size();
+        
+        assertThat(notYetCompletedSize, is(Matchers.greaterThan(5)));
+    }
+
+    @Test
+    public void complete_and_notYetComplete() throws Exception {
+        
+        // given
+        List<ToDoItem> notYetCompleteItems = wrap(service(ToDoItems.class)).notYetComplete();
+        final ToDoItem toDoItem = wrap(notYetCompleteItems.get(0));
+        
+        // when
+        toDoItem.completed();
+        
+        // then
+        assertThat(wrap(service(ToDoItems.class)).notYetComplete().size(), is(notYetCompletedSize-1));
+        assertThat(wrap(service(ToDoItems.class)).complete().size(), is(completedSize+1));
+        
+        // and when
+        toDoItem.notYetCompleted();
+        
+        // then
+        assertThat(wrap(service(ToDoItems.class)).notYetComplete().size(), is(notYetCompletedSize));
+        assertThat(wrap(service(ToDoItems.class)).complete().size(), is(completedSize));
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/repo/ToDoItems_newToDo_and_delete.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/repo/ToDoItems_newToDo_and_delete.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/repo/ToDoItems_newToDo_and_delete.java
new file mode 100644
index 0000000..a12b9f5
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/repo/ToDoItems_newToDo_and_delete.java
@@ -0,0 +1,53 @@
+/*
+ *  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 integration.tests.repo;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import dom.todo.ToDoItem.Category;
+
+import org.junit.Test;
+
+public class ToDoItems_newToDo_and_delete extends ToDoIntegTest {
+
+    @Test
+    public void happyCase() throws Exception {
+        
+        // given
+        int size = wrap(service(ToDoItems.class)).notYetComplete().size();
+        
+        // when
+        final ToDoItem newToDo = wrap(service(ToDoItems.class)).newToDo("new todo", Category.Professional, null, null);
+
+        // then
+        assertThat(newToDo.getDescription(), is("new todo"));
+        assertThat(newToDo.getCategory(), is(Category.Professional));
+        assertThat(wrap(service(ToDoItems.class)).notYetComplete().size(), is(size+1));
+        
+        // when
+        newToDo.delete();
+
+        // then
+        assertThat(wrap(service(ToDoItems.class)).notYetComplete().size(), is(size));
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/smoke/ToDoItem_title.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/smoke/ToDoItem_title.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/smoke/ToDoItem_title.java
new file mode 100644
index 0000000..89b883c
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/smoke/ToDoItem_title.java
@@ -0,0 +1,109 @@
+/*
+ *  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 integration.tests.smoke;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.not;
+import static org.junit.Assert.assertThat;
+import integration.tests.ToDoIntegTest;
+
+import java.util.List;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.joda.time.LocalDate;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.isis.applib.clock.Clock;
+
+public class ToDoItem_title extends ToDoIntegTest {
+
+    private ToDoItem toDoItem;
+    private LocalDate dueBy;
+
+
+    @Before
+    public void setUp() throws Exception {
+
+        scenarioExecution().install(new ToDoItemsFixture());
+        
+        final List<ToDoItem> all = wrap(service(ToDoItems.class)).notYetComplete();
+        toDoItem = wrap(all.get(0));
+
+        dueBy = toDoItem.getDueBy();
+    }
+
+    
+    @Test
+    public void includesDescription() throws Exception {
+
+        // given
+        assertThat(container().titleOf(toDoItem), containsString("Buy bread due by"));
+
+        // when
+        unwrap(toDoItem).setDescription("Buy bread and butter");
+        
+        // then
+        assertThat(container().titleOf(toDoItem), containsString("Buy bread and butter due by"));
+    }
+
+    @Test
+    public void includesDueDateIfAny() throws Exception {
+
+        // given
+        assertThat(container().titleOf(toDoItem), containsString("due by " + dueBy.toString("yyyy-MM-dd")));
+
+        // when
+        final LocalDate fiveDaysFromNow = Clock.getTimeAsLocalDate().plusDays(5);
+        unwrap(toDoItem).setDueBy(fiveDaysFromNow);
+
+        // then
+        assertThat(container().titleOf(toDoItem), containsString("due by " + fiveDaysFromNow.toString("yyyy-MM-dd")));
+    }
+
+
+    @Test
+    public void ignoresDueDateIfNone() throws Exception {
+
+        // when
+        // (since wrapped, will call clearDueBy) 
+        toDoItem.setDueBy(null);
+
+        // then
+        assertThat(container().titleOf(toDoItem), not(containsString("due by")));
+    }
+
+    @Test
+    public void usesWhetherCompleted() throws Exception {
+
+        // given
+        assertThat(container().titleOf(toDoItem), not(containsString("Completed!")));
+
+        // when
+        toDoItem.completed();
+
+        // then
+        assertThat(container().titleOf(toDoItem), not(containsString("due by")));
+        assertThat(container().titleOf(toDoItem), containsString("Buy bread - Completed!"));
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/88064426/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integtests/AbstractIntegTest.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integtests/AbstractIntegTest.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integtests/AbstractIntegTest.java
deleted file mode 100644
index 3f0f4b9..0000000
--- a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integtests/AbstractIntegTest.java
+++ /dev/null
@@ -1,39 +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 integtests;
-
-import org.apache.log4j.PropertyConfigurator;
-import org.junit.BeforeClass;
-
-import org.apache.isis.core.integtestsupport.IntegrationTestAbstract;
-import org.apache.isis.core.integtestsupport.scenarios.ScenarioExecutionForIntegration;
-
-public abstract class AbstractIntegTest extends IntegrationTestAbstract {
-
-    
-    @BeforeClass
-    public static void initClass() {
-        PropertyConfigurator.configure("logging.properties");
-        ToDoSystemInitializer.initIsft();
-        
-        // instantiating will install onto ThreadLocal
-        new ScenarioExecutionForIntegration();
-    }
-
-}
\ No newline at end of file