http://git-wip-us.apache.org/repos/asf/isis-site/blob/1e14c189/content/guides/ugtst/ugtst.html
----------------------------------------------------------------------
diff --git a/content/guides/ugtst/ugtst.html b/content/guides/ugtst/ugtst.html
index 3ca3cdf..6664c35 100644
--- a/content/guides/ugtst/ugtst.html
+++ b/content/guides/ugtst/ugtst.html
@@ -2394,86 +2394,80 @@ Customer customer = 
(Customer)((WrappingObject)wrappedCustomer).__isis_wrapped()
          <div class="paragraph"> 
           <p>The code that goes in step definitions is broadly the same as the 
code that goes in an integration test method. One benefit of using step 
definitions (rather than integration tests) is that the step definitions are 
reusable across scenarios, so there may be less code overall to maintain. For 
example, if you have a step definition that maps to "given an uncompleted todo 
item", then this can be used for all the scenarios that start with that as 
their precondition.</p> 
          </div> 
+        </div> 
+        <div class="sect2"> 
+         <h3 id="_ugtst_bdd-spec-support_writing-a-bdd-spec">5.2. Writing a 
BDD spec (<code>1.16.0-SNAPSHOT</code>)</h3>
+         <div class="btn-group" style="float: right; font-size: small; 
padding: 6px; margin-top: -55px; ">
+          <button type="button" class="btn btn-xs btn-default" 
onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_writing-a-bdd-spec.adoc&quot;";><i
 class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
+          <button type="button" class="btn btn-xs btn-default dropdown-toggle" 
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span 
class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
+          <ul class="dropdown-menu">
+           <li><a 
href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_writing-a-bdd-spec.adoc";
 target="_blank"><i class="fa fa-pencil-square-o fa-fw" 
aria-hidden="true"></i>&nbsp; Edit</a></li>
+           <li><a 
href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_writing-a-bdd-spec.adoc";
 target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i>&nbsp; 
History</a></li>
+           <li><a 
href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_writing-a-bdd-spec.adoc";
 target="_blank"><i class="fa fa-file-text-o fa-fw" 
aria-hidden="true"></i>&nbsp; Raw</a></li>
+           <li><a 
href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_writing-a-bdd-spec.adoc";
 target="_blank"><i class="fa fa-hand-o-right fa-fw" 
aria-hidden="true"></i>&nbsp; Blame</a></li>
+          </ul>
+         </div> 
          <div class="paragraph"> 
-          <p>Unresolved directive in _ugtst_bdd-spec-support.adoc - 
include::_ugtst_bdd-spec-support_key-classes.adoc[leveloffset=+1] :leveloffset: 
+1</p> 
+          <p>BDD specifications contain:</p> 
          </div> 
-        </div> 
-       </div> 
-      </div> 
-      <div class="sect1"> 
-       <h2 id="_ugtst_bdd-spec-support_writing-a-bdd-spec">6. Writing a BDD 
spec (<code>1.16.0-SNAPSHOT</code>)</h2>
-       <div class="btn-group" style="float: right; font-size: small; padding: 
6px; margin-top: -55px; ">
-        <button type="button" class="btn btn-xs btn-default" 
onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_writing-a-bdd-spec.adoc&quot;";><i
 class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
-        <button type="button" class="btn btn-xs btn-default dropdown-toggle" 
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span 
class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
-        <ul class="dropdown-menu">
-         <li><a 
href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_writing-a-bdd-spec.adoc";
 target="_blank"><i class="fa fa-pencil-square-o fa-fw" 
aria-hidden="true"></i>&nbsp; Edit</a></li>
-         <li><a 
href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_writing-a-bdd-spec.adoc";
 target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i>&nbsp; 
History</a></li>
-         <li><a 
href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_writing-a-bdd-spec.adoc";
 target="_blank"><i class="fa fa-file-text-o fa-fw" 
aria-hidden="true"></i>&nbsp; Raw</a></li>
-         <li><a 
href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_writing-a-bdd-spec.adoc";
 target="_blank"><i class="fa fa-hand-o-right fa-fw" 
aria-hidden="true"></i>&nbsp; Blame</a></li>
-        </ul>
-       </div> 
-       <div class="sectionbody"> 
-        <div class="paragraph"> 
-         <p>BDD specifications contain:</p> 
-        </div> 
-        <div class="ulist"> 
-         <ul> 
-          <li> <p>a <code>XxxSpec.feature</code> file, describing the feature 
and the scenarios (given/when/then)s that constitute its acceptance 
criteria</p> </li> 
-          <li> <p>a <code>RunSpecs.java</code> class file to run the 
specification (all boilerplate). This will run all <code>.feature</code> files 
in the same package or subpackages.</p> </li> 
-          <li> <p>one or several <code>XxxGlue</code> constituting the step 
definitions to be matched against.<br></p> 
-           <div class="paragraph"> 
-            <p>The "glue" (step definitions) are intended to be reused across 
features. We therefore recommend that they reside in a separate package, and 
are organized by the entity type upon which they act.<br></p> 
-           </div> 
-           <div class="paragraph"> 
-            <p>For example, given a feature that involves 
<code>Customer</code> and <code>Order</code>, have the step definitions 
pertaining to <code>Customer</code> reside in <code>CustomerGlue</code>, and 
the step definitions pertaining to <code>Order</code> reside in 
<code>OrderGlue</code>.<br></p> 
-           </div> 
-           <div class="paragraph"> 
-            <p>The <code>glue</code> attribute of the Cucumber-JVM JUnit 
runner allows you to indicate which package(s) should be recursively searched 
to find any glue.</p> 
-           </div> 
-           <div class="paragraph"> 
-            <p>There also needs to be one glue class that is used to bootstrap 
the runtime.</p> 
-           </div> </li> 
-         </ul> 
-        </div> 
-        <div class="paragraph"> 
-         <p>Here’s an example of a feature from the <a 
href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp 
archetype</a>:</p> 
-        </div> 
-        <div class="listingblock"> 
-         <div class="content"> 
-          <pre class="CodeRay highlight"><code data-lang="java"><span 
class="annotation">@DomainAppDemo</span>
+         <div class="ulist"> 
+          <ul> 
+           <li> <p>a <code>XxxSpec.feature</code> file, describing the feature 
and the scenarios (given/when/then)s that constitute its acceptance 
criteria</p> </li> 
+           <li> <p>a <code>RunSpecs.java</code> class file to run the 
specification (all boilerplate). This will run all <code>.feature</code> files 
in the same package or subpackages.</p> </li> 
+           <li> <p>one or several <code>XxxGlue</code> constituting the step 
definitions to be matched against.<br></p> 
+            <div class="paragraph"> 
+             <p>The "glue" (step definitions) are intended to be reused across 
features. We therefore recommend that they reside in a separate package, and 
are organized by the entity type upon which they act.<br></p> 
+            </div> 
+            <div class="paragraph"> 
+             <p>For example, given a feature that involves 
<code>Customer</code> and <code>Order</code>, have the step definitions 
pertaining to <code>Customer</code> reside in <code>CustomerGlue</code>, and 
the step definitions pertaining to <code>Order</code> reside in 
<code>OrderGlue</code>.<br></p> 
+            </div> 
+            <div class="paragraph"> 
+             <p>The <code>glue</code> attribute of the Cucumber-JVM JUnit 
runner allows you to indicate which package(s) should be recursively searched 
to find any glue.</p> 
+            </div> 
+            <div class="paragraph"> 
+             <p>There also needs to be one glue class that is used to 
bootstrap the runtime.</p> 
+            </div> </li> 
+          </ul> 
+         </div> 
+         <div class="paragraph"> 
+          <p>Here’s an example of a feature from the <a 
href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp 
archetype</a>:</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code data-lang="java"><span 
class="annotation">@DomainAppDemo</span>
 Feature: <span class="predefined-type">List</span> and Create New Simple 
Objects
 
   Scenario: Existing simple objects can be listed and <span 
class="keyword">new</span> ones created
     Given there are initially <span class="integer">10</span> simple objects
     When  I create a <span class="keyword">new</span> simple object
     Then  there are <span class="integer">11</span> simple 
objects</code></pre> 
+          </div> 
          </div> 
-        </div> 
-        <div class="paragraph"> 
-         <p>The "@DomainAppDemo" is a custom tag we’ve specified to indicate 
the prerequisite fixtures to be loaded; more on this in a moment.</p> 
-        </div> 
-        <div class="admonitionblock note"> 
-         <table> 
-          <tbody>
-           <tr> 
-            <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> 
-            <td class="content"> 
-             <div class="paragraph"> 
-              <p>Prior to <code>1.16.0-SNAPSHOT</code> the BDD spec support 
provided by the framework aimed to allow tests to be written either as 
integration tests or as unit tests. While there are good reasons for attempting 
this (see <a 
href="http://silkandspinach.net/2013/01/18/a-testing-strategy/";>these</a> <a 
href="http://claysnow.co.uk/the-testing-iceberg/";>blog</a> <a 
href="http://claysnow.co.uk/living-documentation-can-be-readable-and-fast/";>posts</a>),
 the downside is that the programming model to support unit tests is quite 
different from "normal" Isis code.</p> 
-             </div> 
-             <div class="paragraph"> 
-              <p>This feature is therefore being dropped. As of 
<code>1.16.0-SNAPSHOT</code>, BDD specs are assumed to run only as integration 
tests.</p> 
-             </div> </td> 
-           </tr> 
-          </tbody>
-         </table> 
-        </div> 
-        <div class="paragraph"> 
-         <p>The <code>RunBddSpecs</code> class to run this feature (and any 
other features in this package or subpackages) is just boilerplate</p> 
-        </div> 
-        <div class="listingblock"> 
-         <div class="content"> 
-          <pre class="CodeRay highlight"><code data-lang="java"><span 
class="annotation">@RunWith</span>(Cucumber.class)
+         <div class="paragraph"> 
+          <p>The "@DomainAppDemo" is a custom tag we’ve specified to 
indicate the prerequisite fixtures to be loaded; more on this in a moment.</p> 
+         </div> 
+         <div class="admonitionblock note"> 
+          <table> 
+           <tbody>
+            <tr> 
+             <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> 
+             <td class="content"> 
+              <div class="paragraph"> 
+               <p>Prior to <code>1.16.0-SNAPSHOT</code> the BDD spec support 
provided by the framework aimed to allow tests to be written either as 
integration tests or as unit tests. While there are good reasons for attempting 
this (see <a 
href="http://silkandspinach.net/2013/01/18/a-testing-strategy/";>these</a> <a 
href="http://claysnow.co.uk/the-testing-iceberg/";>blog</a> <a 
href="http://claysnow.co.uk/living-documentation-can-be-readable-and-fast/";>posts</a>),
 the downside is that the programming model to support unit tests is quite 
different from "normal" Isis code.</p> 
+              </div> 
+              <div class="paragraph"> 
+               <p>This feature is therefore being dropped. As of 
<code>1.16.0-SNAPSHOT</code>, BDD specs are assumed to run only as integration 
tests.</p> 
+              </div> </td> 
+            </tr> 
+           </tbody>
+          </table> 
+         </div> 
+         <div class="paragraph"> 
+          <p>The <code>RunBddSpecs</code> class to run this feature (and any 
other features in this package or subpackages) is just boilerplate</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code data-lang="java"><span 
class="annotation">@RunWith</span>(Cucumber.class)
 <span class="annotation">@CucumberOptions</span>(
         format = {
                 <span class="string"><span class="delimiter">"</span><span 
class="content">html:target/cucumber-html-report</span><span 
class="delimiter">"</span></span>
@@ -2489,69 +2483,69 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
 <span class="directive">public</span> <span class="type">class</span> <span 
class="class">RunBddSpecs</span> {
     <span class="comment">// intentionally empty</span>
 }</code></pre> 
+          </div> 
          </div> 
-        </div> 
-        <div class="paragraph"> 
-         <p>The JSON formatter allows integration with enhanced reports. 
(Commented out) configuration for this is provided in the <a 
href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp 
archetype</a>.</p> 
-        </div> 
-        <div class="paragraph"> 
-         <p>The bootstrapping of Apache Isis itself lives in a 
<code>BootstrappingGlue</code> step definition:</p> 
-        </div> 
-        <div class="listingblock"> 
-         <div class="content"> 
-          <pre class="CodeRay highlight"><code data-lang="java"><span 
class="directive">public</span> <span class="type">class</span> <span 
class="class">BootstrappingGlue</span> <span class="directive">extends</span> 
CukeGlueBootstrappingAbstract {  <i class="conum" data-value="1"></i><b>(1)</b>
+         <div class="paragraph"> 
+          <p>The JSON formatter allows integration with enhanced reports. 
(Commented out) configuration for this is provided in the <a 
href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp 
archetype</a>.</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>The bootstrapping of Apache Isis itself lives in a 
<code>BootstrappingGlue</code> step definition:</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code data-lang="java"><span 
class="directive">public</span> <span class="type">class</span> <span 
class="class">BootstrappingGlue</span> <span class="directive">extends</span> 
CukeGlueBootstrappingAbstract {  <i class="conum" data-value="1"></i><b>(1)</b>
     <span class="directive">public</span> BootstrappingGlue() {
         <span class="local-variable">super</span>(<span 
class="keyword">new</span> DomainAppApplicationModule());                       
 <i class="conum" data-value="2"></i><b>(2)</b>
     }
 }</code></pre> 
+          </div> 
          </div> 
-        </div> 
-        <div class="colist arabic"> 
-         <table> 
-          <tbody>
-           <tr> 
-            <td><i class="conum" data-value="1"></i><b>1</b></td> 
-            <td>superclass contains the bootstrapping logic. This reuses many 
of the same classes as the integration testing framework</td> 
-           </tr> 
-           <tr> 
-            <td><i class="conum" data-value="2"></i><b>2</b></td> 
-            <td>the <code>Module</code> to use to bootstrap the application in 
headless mode.</td> 
-           </tr> 
-          </tbody>
-         </table> 
-        </div> 
-        <div class="paragraph"> 
-         <p>The fixture to run also lives in its own step definition, 
<code>CatalogOfFixturesGlue</code>:</p> 
-        </div> 
-        <div class="listingblock"> 
-         <div class="content"> 
-          <pre class="CodeRay highlight"><code data-lang="java"><span 
class="directive">public</span> <span class="type">class</span> <span 
class="class">CatalogOfFixturesGlue</span> <span 
class="directive">extends</span> CukeGlueAbstract2 {
+         <div class="colist arabic"> 
+          <table> 
+           <tbody>
+            <tr> 
+             <td><i class="conum" data-value="1"></i><b>1</b></td> 
+             <td>superclass contains the bootstrapping logic. This reuses many 
of the same classes as the integration testing framework</td> 
+            </tr> 
+            <tr> 
+             <td><i class="conum" data-value="2"></i><b>2</b></td> 
+             <td>the <code>Module</code> to use to bootstrap the application 
in headless mode.</td> 
+            </tr> 
+           </tbody>
+          </table> 
+         </div> 
+         <div class="paragraph"> 
+          <p>The fixture to run also lives in its own step definition, 
<code>CatalogOfFixturesGlue</code>:</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code data-lang="java"><span 
class="directive">public</span> <span class="type">class</span> <span 
class="class">CatalogOfFixturesGlue</span> <span 
class="directive">extends</span> CukeGlueAbstract2 {
     <span class="annotation">@Before</span>(value={<span class="string"><span 
class="delimiter">"</span><span class="content">@DomainAppDemo</span><span 
class="delimiter">"</span></span>}, order=<span class="integer">20000</span>)
     <span class="directive">public</span> <span class="type">void</span> 
runDomainAppDemo() {
         fixtureScripts.runFixtureScript(<span class="keyword">new</span> 
DomainAppDemo(), <span class="predefined-constant">null</span>); <i 
class="conum" data-value="1"></i><b>(1)</b>
     }
 }</code></pre> 
+          </div> 
          </div> 
-        </div> 
-        <div class="colist arabic"> 
-         <table> 
-          <tbody>
-           <tr> 
-            <td><i class="conum" data-value="1"></i><b>1</b></td> 
-            <td>The <code>fixtureScripts</code> service is inherited from the 
superclass.</td> 
-           </tr> 
-          </tbody>
-         </table> 
-        </div> 
-        <div class="paragraph"> 
-         <p>This will only activate for feature files tagged with 
"@DomainAppDemo".</p> 
-        </div> 
-        <div class="paragraph"> 
-         <p>Finally, the step definitions pertaining to 
<code>SimpleObject</code> domain entity then reside in the 
<code>SimpleObjectGlue</code> class. This is where the heavy lifting gets 
done:</p> 
-        </div> 
-        <div class="listingblock"> 
-         <div class="content"> 
-          <pre class="CodeRay highlight"><code data-lang="java"><span 
class="directive">public</span> <span class="type">class</span> <span 
class="class">SimpleObjectMenuGlue</span> <span 
class="directive">extends</span> CukeGlueAbstract2 {
+         <div class="colist arabic"> 
+          <table> 
+           <tbody>
+            <tr> 
+             <td><i class="conum" data-value="1"></i><b>1</b></td> 
+             <td>The <code>fixtureScripts</code> service is inherited from the 
superclass.</td> 
+            </tr> 
+           </tbody>
+          </table> 
+         </div> 
+         <div class="paragraph"> 
+          <p>This will only activate for feature files tagged with 
"@DomainAppDemo".</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>Finally, the step definitions pertaining to 
<code>SimpleObject</code> domain entity then reside in the 
<code>SimpleObjectGlue</code> class. This is where the heavy lifting gets 
done:</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code data-lang="java"><span 
class="directive">public</span> <span class="type">class</span> <span 
class="class">SimpleObjectMenuGlue</span> <span 
class="directive">extends</span> CukeGlueAbstract2 {
 
     <span class="annotation">@Given</span>(<span class="string"><span 
class="delimiter">"</span><span class="content">^there are.* (</span><span 
class="char">\\</span><span class="content">d+) simple objects$</span><span 
class="delimiter">"</span></span>)                           <i class="conum" 
data-value="1"></i><b>(1)</b>
     <span class="directive">public</span> <span class="type">void</span> 
there_are_N_simple_objects(<span class="type">int</span> n) <span 
class="directive">throws</span> <span class="predefined-type">Throwable</span> {
@@ -2567,54 +2561,65 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
     <span class="annotation">@Inject</span>
     SimpleObjectMenu simpleObjectMenu;                                      <i 
class="conum" data-value="3"></i><b>(3)</b>
 }</code></pre> 
+          </div> 
+         </div> 
+         <div class="colist arabic"> 
+          <table> 
+           <tbody>
+            <tr> 
+             <td><i class="conum" data-value="1"></i><b>1</b></td> 
+             <td>regex to match to feature file specification</td> 
+            </tr> 
+            <tr> 
+             <td><i class="conum" data-value="2"></i><b>2</b></td> 
+             <td>the inherited <code>wrap(…​)</code> method delegates to 
<code>WrapperFactory#wrap(…​)</code></td> 
+            </tr> 
+            <tr> 
+             <td><i class="conum" data-value="3"></i><b>3</b></td> 
+             <td>injected in the usual way</td> 
+            </tr> 
+           </tbody>
+          </table> 
+         </div> 
+         <div class="admonitionblock tip"> 
+          <table> 
+           <tbody>
+            <tr> 
+             <td class="icon"> <i class="fa icon-tip" title="Tip"></i> </td> 
+             <td class="content"> 
+              <div class="paragraph"> 
+               <p>The <a 
href="rgsvc.html#_rgsvc_api_Scratchpad"><code>Scratchpad</code></a> domain 
service is one way in which glue classes can pass state between each other. Or, 
for more type safety, you could develop your own custom domain services for 
each scenario, and inject these in as regular services. See <a 
href="http://www.thinkcode.se/blog/2017/04/01/sharing-state-between-steps-in-cucumberjvm-using-picocontainer";>this
 blog</a> post for more details.</p> 
+              </div> </td> 
+            </tr> 
+           </tbody>
+          </table> 
+         </div> 
+         <div class="admonitionblock tip"> 
+          <table> 
+           <tbody>
+            <tr> 
+             <td class="icon"> <i class="fa icon-tip" title="Tip"></i> </td> 
+             <td class="content"> 
+              <div class="paragraph"> 
+               <p>If using Java 8, note that Cucumber JVM supports a <a 
href="https://cucumber.io/docs/reference/jvm#java-8-lambdas";>simplified syntax 
using lambdas</a>.</p> 
+              </div> </td> 
+            </tr> 
+           </tbody>
+          </table> 
          </div> 
-        </div> 
-        <div class="colist arabic"> 
-         <table> 
-          <tbody>
-           <tr> 
-            <td><i class="conum" data-value="1"></i><b>1</b></td> 
-            <td>regex to match to feature file specification</td> 
-           </tr> 
-           <tr> 
-            <td><i class="conum" data-value="2"></i><b>2</b></td> 
-            <td>the inherited <code>wrap(…​)</code> method delegates to 
<code>WrapperFactory#wrap(…​)</code></td> 
-           </tr> 
-           <tr> 
-            <td><i class="conum" data-value="3"></i><b>3</b></td> 
-            <td>injected in the usual way</td> 
-           </tr> 
-          </tbody>
-         </table> 
-        </div> 
-        <div class="admonitionblock tip"> 
-         <table> 
-          <tbody>
-           <tr> 
-            <td class="icon"> <i class="fa icon-tip" title="Tip"></i> </td> 
-            <td class="content"> 
-             <div class="paragraph"> 
-              <p>The <a 
href="rgsvc.html#_rgsvc_api_Scratchpad"><code>Scratchpad</code></a> domain 
service is one way in which glue classes can pass state between each other. Or, 
for more type safety, you could develop your own custom domain services for 
each scenario, and inject these in as regular services. See <a 
href="http://www.thinkcode.se/blog/2017/04/01/sharing-state-between-steps-in-cucumberjvm-using-picocontainer";>this
 blog</a> post for more details.</p> 
-             </div> </td> 
-           </tr> 
-          </tbody>
-         </table> 
-        </div> 
-        <div class="admonitionblock tip"> 
-         <table> 
-          <tbody>
-           <tr> 
-            <td class="icon"> <i class="fa icon-tip" title="Tip"></i> </td> 
-            <td class="content"> 
-             <div class="paragraph"> 
-              <p>If using Java 8, note that Cucumber JVM supports a <a 
href="https://cucumber.io/docs/reference/jvm#java-8-lambdas";>simplified syntax 
using lambdas</a>.</p> 
-             </div> </td> 
-           </tr> 
-          </tbody>
-         </table> 
         </div> 
         <div class="sect2"> 
-         <h3 id="_ugtst_bdd-spec-support_maven-configuration">6.1. Maven 
Configuration</h3> 
+         <h3 id="_ugtst_bdd-spec-support_maven-configuration">5.3. Maven 
Configuration</h3>
+         <div class="btn-group" style="float: right; font-size: small; 
padding: 6px; margin-top: -55px; ">
+          <button type="button" class="btn btn-xs btn-default" 
onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_maven-configuration.adoc&quot;";><i
 class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
+          <button type="button" class="btn btn-xs btn-default dropdown-toggle" 
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span 
class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
+          <ul class="dropdown-menu">
+           <li><a 
href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_maven-configuration.adoc";
 target="_blank"><i class="fa fa-pencil-square-o fa-fw" 
aria-hidden="true"></i>&nbsp; Edit</a></li>
+           <li><a 
href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_maven-configuration.adoc";
 target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i>&nbsp; 
History</a></li>
+           <li><a 
href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_maven-configuration.adoc";
 target="_blank"><i class="fa fa-file-text-o fa-fw" 
aria-hidden="true"></i>&nbsp; Raw</a></li>
+           <li><a 
href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_bdd-spec-support_maven-configuration.adoc";
 target="_blank"><i class="fa fa-hand-o-right fa-fw" 
aria-hidden="true"></i>&nbsp; Blame</a></li>
+          </ul>
+         </div> 
          <div class="paragraph"> 
           <p>Apache Isis' BDD spec support is automatically configured if you 
use the <a 
href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp 
archetype</a>. To set it up manually, update the <code>pom.xml</code> of your 
domain object model module:</p> 
          </div> 
@@ -2694,7 +2699,7 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
        </div> 
       </div> 
       <div class="sect1"> 
-       <h2 id="_ugtst_fixture-scripts">7. Fixture Scripts</h2>
+       <h2 id="_ugtst_fixture-scripts">6. Fixture Scripts</h2>
        <div class="btn-group" style="float: right; font-size: small; padding: 
6px; margin-top: -55px; ">
         <button type="button" class="btn btn-xs btn-default" 
onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts.adoc&quot;";><i
 class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
         <button type="button" class="btn btn-xs btn-default dropdown-toggle" 
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span 
class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -2716,7 +2721,7 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
          <p>Even more significantly, there’s no way to guarantee that the 
data that’s being loaded is logically consistent with the business behaviour 
of the domain objects themselves. That is, there’s nothing to stop your test 
from putting data into the database that would be invalid if one attempted to 
add it through the app.</p> 
         </div> 
         <div class="paragraph"> 
-         <p>The solution that Apache Isis provides is a small library called 
<strong><em>fixture scripts</em></strong>. A fixture script is basically a 
wrapper for executing arbitrary work, but that work almost always invoking a 
business action.</p> 
+         <p>The solution that Apache Isis provides is a small library called 
<strong><em>fixture scripts</em></strong>. A fixture script is basically a 
command object for executing arbitrary work, where the work in question is 
almost always invoking one or more business actions. In other words, the 
database is populating through the functionality of the domain object model 
itself.</p> 
         </div> 
         <div class="admonitionblock tip"> 
          <table> 
@@ -2751,7 +2756,7 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
          <p>The following sections explain the API and how to go about using 
the API.</p> 
         </div> 
         <div class="sect2"> 
-         <h3 id="_ugtst_fixture-scripts_api-and-usage">7.1. API and Usage</h3>
+         <h3 id="_ugtst_fixture-scripts_api-and-usage">6.1. API and Usage</h3>
          <div class="btn-group" style="float: right; font-size: small; 
padding: 6px; margin-top: -55px; ">
           <button type="button" class="btn btn-xs btn-default" 
onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage.adoc&quot;";><i
 class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
           <button type="button" class="btn btn-xs btn-default dropdown-toggle" 
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span 
class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
@@ -2763,7 +2768,7 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
           </ul>
          </div> 
          <div class="paragraph"> 
-          <p>There are two parts to using fixture scripts: the 
<code>FixtureScripts</code> domain service class, and the 
<code>FixtureScript</code> view model class:</p> 
+          <p>There are two main parts to using fixture scripts: the 
<code>FixtureScripts</code> domain service class, and the 
<code>FixtureScript</code> view model class:</p> 
          </div> 
          <div class="ulist"> 
           <ul> 
@@ -2775,35 +2780,39 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
           <p>Let’s look at <code>FixtureScripts</code> domain service in 
more detail first.</p> 
          </div> 
          <div class="sect3"> 
-          <h4 id="__code_fixturescripts_code">7.1.1. 
<code>FixtureScripts</code></h4> 
-          <div class="paragraph"> 
-           <p>There are two ways in which you can provide a 
<code>FixtureScripts</code> service.</p> 
-          </div> 
-          <div class="paragraph"> 
-           <p>The original (pre-<code>1.9.0</code>) approach is to subclass 
subclass <code>FixtureScripts</code> domain service, with your subclass 
specifying which package to search for. Various other settings can also be 
provided, and - being a custom class - you can also add in additional actions. 
A common example is to provide a "one-shot" action to recreate a standard demo 
set of objects.</p> 
+          <h4 id="_ugtst_fixture-scripts_api-and-usage_FixtureScripts">6.1.1. 
<code>FixtureScripts</code></h4>
+          <div class="btn-group" style="float: right; font-size: small; 
padding: 6px; margin-top: -55px; ">
+           <button type="button" class="btn btn-xs btn-default" 
onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_FixtureScripts.adoc&quot;";><i
 class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
+           <button type="button" class="btn btn-xs btn-default 
dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" 
aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle 
Dropdown</span></button>
+           <ul class="dropdown-menu">
+            <li><a 
href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_FixtureScripts.adoc";
 target="_blank"><i class="fa fa-pencil-square-o fa-fw" 
aria-hidden="true"></i>&nbsp; Edit</a></li>
+            <li><a 
href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_FixtureScripts.adoc";
 target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i>&nbsp; 
History</a></li>
+            <li><a 
href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_FixtureScripts.adoc";
 target="_blank"><i class="fa fa-file-text-o fa-fw" 
aria-hidden="true"></i>&nbsp; Raw</a></li>
+            <li><a 
href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_FixtureScripts.adoc";
 target="_blank"><i class="fa fa-hand-o-right fa-fw" 
aria-hidden="true"></i>&nbsp; Blame</a></li>
+           </ul>
           </div> 
           <div class="paragraph"> 
-           <p>As of <code>1.9.0</code> there is an alternative design. Instead 
of subclassing <code>FixtureScripts</code> you instead implement the <a 
href="../rgsvc/rgsvc.html#_rgsvc_testing_FixtureScriptsSpecificationProvider"><code>FixtureScriptsSpecificationProvider</code></a>
 SPI. (As its name suggests), this provides a 
<code>FixtureScriptsSpecification</code> object that contains the same 
information as would otherwise have been in the <code>FixtureScripts</code> 
subclass.</p> 
+           <p>The framework provides a default implementation of 
<code>FixtureScripts</code> domain service, namely the <a 
href="../rgsvc/rgsvc.html#_rgsvc_testing_FixtureScriptsDefault"><code>FixtureScriptsDefault</code></a>
 domain service. This is annotated to be rendered on the secondary 
"Prototyping" menu.</p> 
           </div> 
           <div class="paragraph"> 
-           <p>The actual implementation of the <code>FixtureScripts</code> 
service is then provided by the framework itself, namely the <a 
href="../rgsvc/rgsvc.html#_rgsvc_testing_FixtureScriptsDefault"><code>FixtureScriptsDefault</code></a>
 domain service, annotated to be rendered on the secondary "Prototyping" menu. 
This uses the <code>FixtureScriptsSpecificationProvider</code> to adjust itself 
accordinly.</p> 
+           <p>The behaviour of this domain menu service can be refined by 
providing an implementation of the optional <a 
href="../rgsvc/rgsvc.html#_rgsvc_testing_FixtureScriptsSpecificationProvider"><code>FixtureScriptsSpecificationProvider</code></a>
 SPI.</p> 
           </div> 
           <div class="paragraph"> 
            <p>For example, here’s the 
<code>FixtureScriptsSpecificationProvider</code> service that’s generated by 
the <a 
href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp 
archetype</a>:</p> 
           </div> 
           <div class="listingblock"> 
            <div class="content"> 
-            <pre class="CodeRay highlight"><code data-lang="java"><span 
class="annotation">@DomainService</span>(nature = NatureOfService.DOMAIN)
-<span class="directive">public</span> <span class="type">class</span> <span 
class="class">DomainAppFixturesProvider</span> <span 
class="directive">implements</span> FixtureScriptsSpecificationProvider {
-    <span class="annotation">@Override</span>
+            <pre class="CodeRay highlight"><code data-lang="java"><span 
class="annotation">@DomainService</span>( nature = NatureOfService.DOMAIN )
+<span class="directive">public</span> <span class="type">class</span> <span 
class="class">DomainAppFixtureScriptsSpecificationProvider</span>
+                    <span class="directive">implements</span> 
FixtureScriptsSpecificationProvider {
     <span class="directive">public</span> FixtureScriptsSpecification 
getSpecification() {
         <span class="keyword">return</span> FixtureScriptsSpecification
-                .builder(DomainAppFixturesProvider.class)                      
                 <i class="conum" data-value="1"></i><b>(1)</b>
-                .with(FixtureScripts.MultipleExecutionStrategy.EXECUTE)        
                 <i class="conum" data-value="2"></i><b>(2)</b>
-                .withRunScriptDefault(RecreateSimpleObjects.class)             
                 <i class="conum" data-value="3"></i><b>(3)</b>
-                
.withRunScriptDropDown(FixtureScriptsSpecification.DropDownPolicy.CHOICES)      
<i class="conum" data-value="4"></i><b>(4)</b>
-                .withRecreate(RecreateSimpleObjects.class)                     
                 <i class="conum" data-value="5"></i><b>(5)</b>
-                .build();
+            .builder(DomainAppFixtureScriptsSpecificationProvider.class)       
        <i class="conum" data-value="1"></i><b>(1)</b>
+            .with(FixtureScripts.MultipleExecutionStrategy.EXECUTE)            
        <i class="conum" data-value="2"></i><b>(2)</b>
+            .withRunScriptDefault(DomainAppDemo.class)                         
        <i class="conum" data-value="3"></i><b>(3)</b>
+            
.withRunScriptDropDown(FixtureScriptsSpecification.DropDownPolicy.CHOICES) <i 
class="conum" data-value="4"></i><b>(4)</b>
+            .withRecreate(DomainAppDemo.class)                                 
        <i class="conum" data-value="5"></i><b>(5)</b>
+            .build();
     }
 }</code></pre> 
            </div> 
@@ -2835,75 +2844,7 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
            </table> 
           </div> 
           <div class="paragraph"> 
-           <p>The benefit of this design - decoupling the responsibilities of 
the superclass and the subclass - is that it ensures that there is always an 
instance of <code>FixtureScripts</code> available, even if the application 
itself doesn’t provide one. .</p> 
-          </div> 
-          <div class="paragraph"> 
-           <p>By way of comparison, if using the older pre-<code>1.9.0</code> 
approach then you would create a subclass:</p> 
-          </div> 
-          <div class="listingblock"> 
-           <div class="content"> 
-            <pre class="CodeRay highlight"><code data-lang="java"><span 
class="annotation">@DomainService</span>
-<span class="annotation">@DomainServiceLayout</span>(
-        menuBar = DomainServiceLayout.MenuBar.SECONDARY,           <i 
class="conum" data-value="1"></i><b>(1)</b>
-        named=<span class="string"><span class="delimiter">"</span><span 
class="content">Prototyping</span><span class="delimiter">"</span></span>,      
                                 <i class="conum" data-value="2"></i><b>(2)</b>
-        menuOrder = <span class="string"><span class="delimiter">"</span><span 
class="content">500</span><span class="delimiter">"</span></span>
-)
-<span class="directive">public</span> <span class="type">class</span> <span 
class="class">DomainAppFixturesService</span> <span 
class="directive">extends</span> FixtureScripts {     <i class="conum" 
data-value="3"></i><b>(3)</b>
-    <span class="directive">public</span> DomainAppFixturesService() {
-        <span class="local-variable">super</span>(
-            <span class="string"><span class="delimiter">"</span><span 
class="content">domainapp</span><span class="delimiter">"</span></span>,        
                                   <i class="conum" 
data-value="4"></i><b>(4)</b>
-            MultipleExecutionStrategy.EXECUTE);                    <i 
class="conum" data-value="5"></i><b>(5)</b>
-    }
-    <span class="annotation">@Override</span>
-    <span class="directive">public</span> FixtureScript 
default0RunFixtureScript() {
-        <span class="keyword">return</span> 
findFixtureScriptFor(RecreateSimpleObjects.class);  <i class="conum" 
data-value="6"></i><b>(6)</b>
-    }
-    <span class="annotation">@Override</span>
-    <span class="directive">public</span> <span 
class="predefined-type">List</span>&lt;FixtureScript&gt; 
choices0RunFixtureScript() {        <i class="conum" 
data-value="7"></i><b>(7)</b>
-        <span class="keyword">return</span> <span 
class="local-variable">super</span>.choices0RunFixtureScript();
-    }
-}</code></pre> 
-           </div> 
-          </div> 
-          <div class="colist arabic"> 
-           <table> 
-            <tbody>
-             <tr> 
-              <td><i class="conum" data-value="1"></i><b>1</b></td> 
-              <td>in the UI, render the on the right hand side (secondary) 
menu bar…​</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="2"></i><b>2</b></td> 
-              <td>…​ under the "Prototyping" menu</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="3"></i><b>3</b></td> 
-              <td>inherit from 
<code>org.apache.isis.applib.fixturescripts.FixtureScripts</code></td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="4"></i><b>4</b></td> 
-              <td>search for all fixture scripts under the "domainapp" 
package; in your code this would probably be "com.mycompany.myapp" or 
similar</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="5"></i><b>5</b></td> 
-              <td>if the same fixture script (class) is encountered more than 
once, then run anyway; more on this in <a 
href="../ugtst/ugtst.html#__ugtst_fixture-scripts_api-and-usage_organizing">Organizing
 Fixture scripts</a>], below.</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="6"></i><b>6</b></td> 
-              <td>(optional) specify a default fixture script to run, in this 
case <code>RecreateSimpleObjects</code> fixture script (see below)</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="7"></i><b>7</b></td> 
-              <td>make all fixture scripts found available as a drop-down (by 
increasing the visibility of this method to <code>public</code>)</td> 
-             </tr> 
-            </tbody>
-           </table> 
-          </div> 
-          <div class="paragraph"> 
-           <p>This isn’t quite equivalent; you would need to write 
additional code to support the "recreate objects and return first" action, for 
example.</p> 
-          </div> 
-          <div class="paragraph"> 
-           <p>Either way, here’s how the domain service looks like in the 
UI:</p> 
+           <p>Here’s how the domain service looks like in the UI:</p> 
           </div> 
           <div class="imageblock"> 
            <div class="content"> 
@@ -2960,16 +2901,27 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
           </div> 
          </div> 
          <div class="sect3"> 
-          <h4 id="__code_fixturescript_code">7.1.2. 
<code>FixtureScript</code></h4> 
+          <h4 id="_ugtst_fixture-scripts_api-and-usage_FixtureScript">6.1.2. 
<code>FixtureScript</code></h4>
+          <div class="btn-group" style="float: right; font-size: small; 
padding: 6px; margin-top: -55px; ">
+           <button type="button" class="btn btn-xs btn-default" 
onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_FixtureScript.adoc&quot;";><i
 class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
+           <button type="button" class="btn btn-xs btn-default 
dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" 
aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle 
Dropdown</span></button>
+           <ul class="dropdown-menu">
+            <li><a 
href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_FixtureScript.adoc";
 target="_blank"><i class="fa fa-pencil-square-o fa-fw" 
aria-hidden="true"></i>&nbsp; Edit</a></li>
+            <li><a 
href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_FixtureScript.adoc";
 target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i>&nbsp; 
History</a></li>
+            <li><a 
href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_FixtureScript.adoc";
 target="_blank"><i class="fa fa-file-text-o fa-fw" 
aria-hidden="true"></i>&nbsp; Raw</a></li>
+            <li><a 
href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_FixtureScript.adoc";
 target="_blank"><i class="fa fa-hand-o-right fa-fw" 
aria-hidden="true"></i>&nbsp; Blame</a></li>
+           </ul>
+          </div> 
           <div class="paragraph"> 
            <p>A fixture script is ultimately just a block of code that can be 
executed, so it’s up to you how you implement it to set up the system. 
However, we strongly recommend that you use it to invoke actions on business 
objects, in essence to replay what a real-life user would have done. That way, 
the fixture script will remain valid even if the underlying implementation of 
the system changes in the future.</p> 
           </div> 
           <div class="paragraph"> 
-           <p>Here’s the <code>RecreateSimpleObjects</code> fixture script 
from the <a 
href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp 
archetype</a>:</p> 
+           <p>For example, here’s a fixture script called 
<code>RecreateSimpleObjects</code>. (This used to be part of the <a 
href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp 
archetype</a>, though the archetype now ships with a more sophisticated design, 
discussed below):</p> 
           </div> 
           <div class="listingblock"> 
            <div class="content"> 
-            <pre class="CodeRay highlight"><code data-lang="java"><span 
class="directive">public</span> <span class="type">class</span> <span 
class="class">RecreateSimpleObjects</span> <span 
class="directive">extends</span> FixtureScript {                   <i 
class="conum" data-value="1"></i><b>(1)</b>
+            <pre class="CodeRay highlight"><code data-lang="java"><span 
class="annotation">@lombok</span>.Accessors(chain = <span 
class="predefined-constant">true</span>)
+<span class="directive">public</span> <span class="type">class</span> <span 
class="class">RecreateSimpleObjects</span> <span 
class="directive">extends</span> FixtureScript {                   <i 
class="conum" data-value="1"></i><b>(1)</b>
 
     <span class="directive">public</span> <span class="directive">final</span> 
<span class="predefined-type">List</span>&lt;<span 
class="predefined-type">String</span>&gt; NAMES = <span 
class="predefined-type">Collections</span>.unmodifiableList(<span 
class="predefined-type">Arrays</span>.asList(
             <span class="string"><span class="delimiter">"</span><span 
class="content">Foo</span><span class="delimiter">"</span></span>, <span 
class="string"><span class="delimiter">"</span><span 
class="content">Bar</span><span class="delimiter">"</span></span>, <span 
class="string"><span class="delimiter">"</span><span 
class="content">Baz</span><span class="delimiter">"</span></span>, <span 
class="string"><span class="delimiter">"</span><span 
class="content">Frodo</span><span class="delimiter">"</span></span>, <span 
class="string"><span class="delimiter">"</span><span 
class="content">Froyo</span><span class="delimiter">"</span></span>,
@@ -2977,16 +2929,13 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
     <span class="directive">public</span> RecreateSimpleObjects() {
         withDiscoverability(Discoverability.DISCOVERABLE);                   
<i class="conum" data-value="3"></i><b>(3)</b>
     }
+
+    <span class="annotation">@lombok</span>.Getter <span 
class="annotation">@lombok</span>.Setter
     <span class="directive">private</span> <span 
class="predefined-type">Integer</span> number;                                  
                <i class="conum" data-value="4"></i><b>(4)</b>
-    <span class="directive">public</span> <span 
class="predefined-type">Integer</span> getNumber() { <span 
class="keyword">return</span> number; }
-    <span class="directive">public</span> RecreateSimpleObjects 
setNumber(<span class="directive">final</span> <span 
class="predefined-type">Integer</span> number) {
-        <span class="local-variable">this</span>.number = number;
-        <span class="keyword">return</span> <span 
class="local-variable">this</span>;
-    }
+
+    <span class="annotation">@lombok</span>.Getter
     <span class="directive">private</span> <span 
class="directive">final</span> <span 
class="predefined-type">List</span>&lt;SimpleObject&gt; simpleObjects = 
Lists.newArrayList();   <i class="conum" data-value="5"></i><b>(5)</b>
-    <span class="directive">public</span> <span 
class="predefined-type">List</span>&lt;SimpleObject&gt; getSimpleObjects() {
-        <span class="keyword">return</span> simpleObjects;
-    }
+
     <span class="annotation">@Override</span>
     <span class="directive">protected</span> <span class="type">void</span> 
execute(<span class="directive">final</span> ExecutionContext ec) {          <i 
class="conum" data-value="6"></i><b>(6)</b>
         <span class="comment">// defaults</span>
@@ -3059,91 +3008,25 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
           </div> 
           <div class="imageblock"> 
            <div class="content"> 
-            <a class="image" 
href="images/testing/fixture-scripts/prompt.png"><img 
src="images/testing/fixture-scripts/prompt.png" alt="prompt" width="700px"></a> 
-           </div> 
-          </div> 
-          <div class="paragraph"> 
-           <p>When this is executed, the framework will parse the text and 
attempt to reflectively set the corresponding properties on the fixture result. 
So, in this case, when the fixture script is executed we actually get 6 objects 
created:</p> 
-          </div> 
-          <div class="imageblock"> 
-           <div class="content"> 
-            <a class="image" 
href="images/testing/fixture-scripts/result-list.png"><img 
src="images/testing/fixture-scripts/result-list.png" alt="result list" 
width="700px"></a> 
+            <a class="image" 
href="images/testing/fixture-scripts/prompt-specifying-number.png"><img 
src="images/testing/fixture-scripts/prompt-specifying-number.png" alt="prompt 
specifying number" width="700px"></a> 
            </div> 
           </div> 
           <div class="paragraph"> 
-           <p>It’s commonplace for one fixture script to call another. In 
the above example this script called <code>SimpleObjectsTearDown</code> and 
<code>SimpleObjectCreate</code>. Let’s take a quick look at 
<code>SimpleObjectCreate</code>:</p> 
-          </div> 
-          <div class="listingblock"> 
-           <div class="content"> 
-            <pre class="CodeRay highlight"><code data-lang="java"><span 
class="directive">public</span> <span class="type">class</span> <span 
class="class">SimpleObjectCreate</span> <span class="directive">extends</span> 
FixtureScript {       <i class="conum" data-value="1"></i><b>(1)</b>
-
-    <span class="directive">private</span> <span 
class="predefined-type">String</span> name;                                     
 <i class="conum" data-value="2"></i><b>(2)</b>
-    <span class="directive">public</span> <span 
class="predefined-type">String</span> getName() { <span 
class="keyword">return</span> name; }
-    <span class="directive">public</span> SimpleObjectCreate setName(<span 
class="directive">final</span> <span class="predefined-type">String</span> 
name) {
-        <span class="local-variable">this</span>.name = name;
-        <span class="keyword">return</span> <span 
class="local-variable">this</span>;
-    }
-    <span class="directive">private</span> SimpleObject simpleObject;          
              <i class="conum" data-value="3"></i><b>(3)</b>
-    <span class="directive">public</span> SimpleObject getSimpleObject() {
-        <span class="keyword">return</span> simpleObject;
-    }
-    <span class="annotation">@Override</span>
-    <span class="directive">protected</span> <span class="type">void</span> 
execute(<span class="directive">final</span> ExecutionContext ec) {       <i 
class="conum" data-value="4"></i><b>(4)</b>
-        <span class="predefined-type">String</span> name = checkParam(<span 
class="string"><span class="delimiter">"</span><span 
class="content">name</span><span class="delimiter">"</span></span>, ec, <span 
class="predefined-type">String</span>.class);   <i class="conum" 
data-value="5"></i><b>(5)</b>
-        <span class="local-variable">this</span>.simpleObject = 
wrap(simpleObjects)               <i class="conum" data-value="6"></i><b>(6)</b>
-                                .create(name);                <i class="conum" 
data-value="7"></i><b>(7)</b>
-        ec.addResult(<span class="local-variable">this</span>, simpleObject);  
                   <i class="conum" data-value="8"></i><b>(8)</b>
-    }
-    <span class="annotation">@javax</span>.inject.Inject
-    <span class="directive">private</span> SimpleObjects simpleObjects;        
              <i class="conum" data-value="9"></i><b>(9)</b>
-}</code></pre> 
-           </div> 
-          </div> 
-          <div class="colist arabic"> 
-           <table> 
-            <tbody>
-             <tr> 
-              <td><i class="conum" data-value="1"></i><b>1</b></td> 
-              <td>inherit from 
<code>org.apache.isis.applib.fixturescripts.FixtureScript</code>, as above</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="2"></i><b>2</b></td> 
-              <td>input property: name of the object; this time it is 
required</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="3"></i><b>3</b></td> 
-              <td>output property: the created simple object</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="4"></i><b>4</b></td> 
-              <td>the mandatory execute(…​) API</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="5"></i><b>5</b></td> 
-              <td>the <code>checkParam(…​)</code> (inherited from 
<code>FixtureScript</code>) will check that the "name" property has been 
populated (using Java’s Reflection API) and throw an exception if not</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="6"></i><b>6</b></td> 
-              <td>wrap the injected <code>SimpleObjects</code> domain service 
(using the <a 
href="../rgsvc/rgsvc.html#_rgsvc_application-layer-api_WrapperFactory"><code>WrapperFactory</code></a>)
 to simulate interaction through the UI…​</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="7"></i><b>7</b></td> 
-              <td>.. and actually create the object using the "create" 
business action of that service</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="8"></i><b>8</b></td> 
-              <td>add the resulting object to the execution context; this 
makes the object available to access if run from the UI</td> 
-             </tr> 
-             <tr> 
-              <td><i class="conum" data-value="9"></i><b>9</b></td> 
-              <td>inject the domain service into the fixture script</td> 
-             </tr> 
-            </tbody>
-           </table> 
+           <p>When this is executed, the framework will parse the text and 
attempt to reflectively set the corresponding properties on the fixture result. 
So, in this case, when the fixture script is executed we actually get 6 objects 
created.</p> 
           </div> 
          </div> 
          <div class="sect3"> 
-          <h4 id="_using_within_tests">7.1.3. Using within Tests</h4> 
+          <h4 
id="_ugtst_fixture-scripts_api-and-usage_using-within-tests">6.1.3. Using 
within Tests</h4>
+          <div class="btn-group" style="float: right; font-size: small; 
padding: 6px; margin-top: -55px; ">
+           <button type="button" class="btn btn-xs btn-default" 
onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_using-within-tests.adoc&quot;";><i
 class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
+           <button type="button" class="btn btn-xs btn-default 
dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" 
aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle 
Dropdown</span></button>
+           <ul class="dropdown-menu">
+            <li><a 
href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_using-within-tests.adoc";
 target="_blank"><i class="fa fa-pencil-square-o fa-fw" 
aria-hidden="true"></i>&nbsp; Edit</a></li>
+            <li><a 
href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_using-within-tests.adoc";
 target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i>&nbsp; 
History</a></li>
+            <li><a 
href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_using-within-tests.adoc";
 target="_blank"><i class="fa fa-file-text-o fa-fw" 
aria-hidden="true"></i>&nbsp; Raw</a></li>
+            <li><a 
href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_using-within-tests.adoc";
 target="_blank"><i class="fa fa-hand-o-right fa-fw" 
aria-hidden="true"></i>&nbsp; Blame</a></li>
+           </ul>
+          </div> 
           <div class="paragraph"> 
            <p>Fixture scripts can be called from integration tests just the 
same way that fixture scripts can call one another.</p> 
           </div> 
@@ -3153,21 +3036,19 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
           <div class="listingblock"> 
            <div class="content"> 
             <pre class="CodeRay highlight"><code data-lang="java"><span 
class="directive">public</span> <span class="type">class</span> <span 
class="class">SimpleObjectIntegTest</span> <span 
class="directive">extends</span> SimpleAppIntegTest {
-    <span class="annotation">@Inject</span>
-    FixtureScripts fixtureScripts;                      <i class="conum" 
data-value="1"></i><b>(1)</b>
     SimpleObject simpleObjectWrapped;
     <span class="annotation">@Before</span>
     <span class="directive">public</span> <span class="type">void</span> 
setUp() <span class="directive">throws</span> <span 
class="exception">Exception</span> {
         <span class="comment">// given</span>
         RecreateSimpleObjects fs =
-             <span class="keyword">new</span> 
RecreateSimpleObjects().setNumber(<span class="integer">1</span>);  <i 
class="conum" data-value="2"></i><b>(2)</b>
-        fixtureScripts.runFixtureScript(fs, <span 
class="predefined-constant">null</span>);      <i class="conum" 
data-value="3"></i><b>(3)</b>
+             <span class="keyword">new</span> 
RecreateSimpleObjects().setNumber(<span class="integer">1</span>);  <i 
class="conum" data-value="1"></i><b>(1)</b>
+        fixtureScripts.runFixtureScript(fs, <span 
class="predefined-constant">null</span>);      <i class="conum" 
data-value="2"></i><b>(2)</b>
 
         SimpleObject simpleObjectPojo =
-            fs.getSimpleObjects().get(<span class="integer">0</span>);         
      <i class="conum" data-value="4"></i><b>(4)</b>
+            fs.getSimpleObjects().get(<span class="integer">0</span>);         
      <i class="conum" data-value="3"></i><b>(3)</b>
         assertThat(simpleObjectPojo).isNotNull();
 
-        simpleObjectWrapped = wrap(simpleObjectPojo);   <i class="conum" 
data-value="5"></i><b>(5)</b>
+        simpleObjectWrapped = wrap(simpleObjectPojo);   <i class="conum" 
data-value="4"></i><b>(4)</b>
     }
     <span class="annotation">@Test</span>
     <span class="directive">public</span> <span class="type">void</span> 
accessible() <span class="directive">throws</span> <span 
class="exception">Exception</span> {
@@ -3177,6 +3058,8 @@ Feature: <span class="predefined-type">List</span> and 
Create New Simple Objects
         assertThat(name).isEqualTo(fs.NAMES.get(<span 
class="integer">0</span>));
     }
     ...
+    <span class="annotation">@Inject</span>
+    FixtureScripts fixtureScripts;                      <i class="conum" 
data-value="5"></i><b>(5)</b>
 }</code></pre> 
            </div> 
           </div> 
@@ -3185,113 +3068,237 @@ Feature: <span class="predefined-type">List</span> 
and Create New Simple Objects
             <tbody>
              <tr> 
               <td><i class="conum" data-value="1"></i><b>1</b></td> 
-              <td>inject the <code>FixtureScripts</code> domain service (just 
like any other domain service)</td> 
+              <td>instantiate the fixture script for this test, and 
configure</td> 
              </tr> 
              <tr> 
               <td><i class="conum" data-value="2"></i><b>2</b></td> 
-              <td>instantiate the fixture script for this test, and 
configure</td> 
+              <td>execute the fixture script</td> 
              </tr> 
              <tr> 
               <td><i class="conum" data-value="3"></i><b>3</b></td> 
-              <td>execute the fixture script</td> 
+              <td>obtain the object under test from the fixture</td> 
              </tr> 
              <tr> 
               <td><i class="conum" data-value="4"></i><b>4</b></td> 
-              <td>obtain the object under test from the fixture</td> 
+              <td>wrap the object (to simulate being interacted with through 
the UI)</td> 
              </tr> 
              <tr> 
               <td><i class="conum" data-value="5"></i><b>5</b></td> 
-              <td>wrap the object (to simulate being interacted with through 
the UI)</td> 
+              <td>inject the <code>FixtureScripts</code> domain service (just 
like any other domain service)</td> 
              </tr> 
             </tbody>
            </table> 
           </div> 
          </div> 
          <div class="sect3"> 
-          <h4 id="__ugtst_fixture-scripts_api-and-usage_organizing">7.1.4. 
Organizing Fixture scripts</h4> 
+          <h4 
id="_ugtst_fixture-scripts_api-and-usage_persona-and-builders">6.1.4. Personas 
and Builders (<code>1.16.0-SNAPSHOT</code>)</h4>
+          <div class="btn-group" style="float: right; font-size: small; 
padding: 6px; margin-top: -55px; ">
+           <button type="button" class="btn btn-xs btn-default" 
onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_persona-and-builders.adoc&quot;";><i
 class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
+           <button type="button" class="btn btn-xs btn-default 
dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" 
aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle 
Dropdown</span></button>
+           <ul class="dropdown-menu">
+            <li><a 
href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_persona-and-builders.adoc";
 target="_blank"><i class="fa fa-pencil-square-o fa-fw" 
aria-hidden="true"></i>&nbsp; Edit</a></li>
+            <li><a 
href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_persona-and-builders.adoc";
 target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i>&nbsp; 
History</a></li>
+            <li><a 
href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_persona-and-builders.adoc";
 target="_blank"><i class="fa fa-file-text-o fa-fw" 
aria-hidden="true"></i>&nbsp; Raw</a></li>
+            <li><a 
href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_api-and-usage_persona-and-builders.adoc";
 target="_blank"><i class="fa fa-hand-o-right fa-fw" 
aria-hidden="true"></i>&nbsp; Blame</a></li>
+           </ul>
+          </div> 
           <div class="paragraph"> 
-           <p>There are lots of ways to organize fixture scripts, but we’ve 
used them as either:</p> 
+           <p>Good integration tests are probably the best way to understand 
the behaviour of the domain model: better, even, than reading the code itself. 
This requires though that the tests are as minimal as possible so that the 
developer reading the test knows that everything mentioned in the test is 
essential to the functionality under test.</p> 
           </div> 
-          <div class="ulist"> 
-           <ul> 
-            <li> <p>a fairly flat style, eg as in the <a 
href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp 
archetype</a>, also as in the <a 
href="http://github.com/isisaddons/isis-app-todoapp";>Isis addons' 
todoapp</a>;</p> </li> 
-            <li> <p>in a "composite pattern" style, eg as in the <a 
href="https://github.com/estatio/estatio/blob/ea20a6ce257acede50de6ce4fd2ff29713fcd689/estatioapp/fixture/src/main/java/org/estatio/fixture/invoice/InvoiceForLeaseItemTypeOfDiscountOneQuarterForOxfMiracle005.java#L66)">Estatio
 open source app</a>.</p> </li> 
-           </ul> 
+          <div class="paragraph"> 
+           <p>At the same time, "Persona" instances of entity classes help the 
developer become familiar with the data being set up. For example, "Steve 
Single" the Customer might be 21, single and no kids, whereas vs "Meghan 
Married-Mum" the Customer might be married 35 with 2 kids. Using "Steve" vs 
"Meghan" immediately informs the developer about the particular scenario being 
explored.</p> 
           </div> 
           <div class="paragraph"> 
-           <p>These two styles are probably best illustrated with, well, some 
illustrations. Here’s a fixture script in the "flat" style for setting up a 
customer with some orders, a number of which has been placed:</p> 
+           <p>The <code>PersonaWithBuilderScript</code> and 
<code>PersonaWithFinder</code> interfaces are intended to be implemented 
typically by "persona" enums, where each enum instance captures the essential 
data of some persona. So, going back to the previous example, we might 
have:</p> 
           </div> 
-          <div class="imageblock"> 
+          <div class="listingblock"> 
            <div class="content"> 
-            <a class="image" 
href="images/testing/fixture-scripts/flat-1.png"><img 
src="images/testing/fixture-scripts/flat-1.png" alt="flat 1" width="700px"></a> 
+            <pre class="CodeRay highlight"><code data-lang="xml">public enum 
Customer_persona
+        implements PersonaWithBuilderScript<span 
class="tag">&lt;..&gt;</span>, PersonaWithFinder<span 
class="tag">&lt;..&gt;</span> {
+
+    SteveSingle("Steve", "Single", 21, MaritalStatus.SINGLE, 0)
+    MeghanMarriedMum("Meghan", "Married-Mum", 35, MaritalStatus.MARRIED, 2);
+    ...
+}</code></pre> 
            </div> 
           </div> 
           <div class="paragraph"> 
-           <p>Notice how we have a single script that’s in control of the 
overall process, and takes responsibility for passing data from one fixture 
script to the next.</p> 
+           <p>The <code>PersonaWithBuilderScript</code> interface means that 
this enum is able to act as a factory for a <code>BuilderScriptAbstract</code>. 
This is a specialization of <code>FixtureScript</code> that is used to actually 
create the entity (customer, or whatever), using the data taken out of the enum 
instance:</p> 
+          </div> 
+          <div class="listingblock"> 
+           <div class="content"> 
+            <pre class="CodeRay highlight"><code data-lang="xml">public 
interface PersonaWithBuilderScript<span class="tag">&lt;T</span><span 
class="error">,</span> <span class="attribute-name">F</span> <span 
class="attribute-name">extends</span> <span 
class="attribute-name">BuilderScriptAbstract</span><span 
class="error">&lt;</span><span class="attribute-name">T</span><span 
class="error">,</span><span class="attribute-name">F</span><span 
class="tag">&gt;</span><span class="error">&gt;</span>  {
+    F builder();
+}</code></pre> 
+           </div> 
           </div> 
           <div class="paragraph"> 
-           <p>Here’s a similar, simpler script, from the same fictional app, 
to set up two customers:</p> 
+           <p>The <code>PersonaWithFinder</code> interface meanwhile indicates 
that the enum can "lookup" its corresponding entity from the appropriate 
repository domain service:</p> 
           </div> 
-          <div class="imageblock"> 
+          <div class="listingblock"> 
            <div class="content"> 
-            <a class="image" 
href="images/testing/fixture-scripts/flat-2.png"><img 
src="images/testing/fixture-scripts/flat-2.png" alt="flat 2" width="500px"></a> 
+            <pre class="CodeRay highlight"><code data-lang="xml">public 
interface PersonaWithFinder<span class="tag">&lt;T&gt;</span> {
+    T findUsing(final ServiceRegistry2 serviceRegistry);
+
+}</code></pre> 
            </div> 
           </div> 
           <div class="paragraph"> 
-           <p>We can reuse the same fixture "customer" script, either calling 
it twice or (perhaps better) passing it an array of customer details to set 
up.</p> 
+           <p>(As of <code>1.16.0-SNAPSHOT</code>) the <a 
href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp 
archetype</a> provides a sample implementation of these interfaces:</p> 
+          </div> 
+          <div class="listingblock"> 
+           <div class="content"> 
+            <pre class="CodeRay highlight"><code data-lang="java"><span 
class="annotation">@lombok</span>.AllArgsConstructor
+<span class="directive">public</span> <span class="type">enum</span> 
SimpleObject_persona
+        <span class="directive">implements</span> 
PersonaWithBuilderScript&lt;SimpleObject, SimpleObjectBuilder&gt;,
+                   PersonaWithFinder&lt;SimpleObject&gt; {
+    FOO(<span class="string"><span class="delimiter">"</span><span 
class="content">Foo</span><span class="delimiter">"</span></span>),
+    BAR(<span class="string"><span class="delimiter">"</span><span 
class="content">Bar</span><span class="delimiter">"</span></span>),
+    BAZ(<span class="string"><span class="delimiter">"</span><span 
class="content">Baz</span><span class="delimiter">"</span></span>),
+    FRODO(<span class="string"><span class="delimiter">"</span><span 
class="content">Frodo</span><span class="delimiter">"</span></span>),
+    FROYO(<span class="string"><span class="delimiter">"</span><span 
class="content">Froyo</span><span class="delimiter">"</span></span>),
+    FIZZ(<span class="string"><span class="delimiter">"</span><span 
class="content">Fizz</span><span class="delimiter">"</span></span>),
+    BIP(<span class="string"><span class="delimiter">"</span><span 
class="content">Bip</span><span class="delimiter">"</span></span>),
+    BOP(<span class="string"><span class="delimiter">"</span><span 
class="content">Bop</span><span class="delimiter">"</span></span>),
+    BANG(<span class="string"><span class="delimiter">"</span><span 
class="content">Bang</span><span class="delimiter">"</span></span>),
+    BOO(<span class="string"><span class="delimiter">"</span><span 
class="content">Boo</span><span class="delimiter">"</span></span>);
+
+    <span class="directive">private</span> <span 
class="directive">final</span> <span class="predefined-type">String</span> name;
+
+    <span class="annotation">@Override</span>
+    <span class="directive">public</span> SimpleObjectBuilder builder() {
+        <span class="keyword">return</span> <span class="keyword">new</span> 
SimpleObjectBuilder().setName(name);
+    }
+
+    <span class="annotation">@Override</span>
+    <span class="directive">public</span> SimpleObject findUsing(<span 
class="directive">final</span> ServiceRegistry2 serviceRegistry) {
+        SimpleObjectRepository simpleObjectRepository =
+            serviceRegistry.lookupService(SimpleObjectRepository.class);
+        <span class="keyword">return</span> 
simpleObjectRepository.findByNameExact(name);
+    }
+}</code></pre> 
+           </div> 
           </div> 
           <div class="paragraph"> 
-           <p>With the composite style, we rely on each fixture script to set 
up its own prerequisites. Thus:</p> 
+           <p>where <code>SimpleObjectBuilder</code> in turn is:</p> 
           </div> 
-          <div class="imageblock"> 
+          <div class="listingblock"> 
            <div class="content"> 
-            <a class="image" 
href="images/testing/fixture-scripts/composite.png"><img 
src="images/testing/fixture-scripts/composite.png" alt="composite" 
width="550px"></a> 
+            <pre class="CodeRay highlight"><code data-lang="java"><span 
class="annotation">@lombok</span>.Accessors(chain = <span 
class="predefined-constant">true</span>)
+<span class="directive">public</span> <span class="type">class</span> <span 
class="class">SimpleObjectBuilder</span>
+            <span class="directive">extends</span> 
BuilderScriptAbstract&lt;SimpleObject, SimpleObjectBuilder&gt; {
+
+    <span class="annotation">@lombok</span>.Getter <span 
class="annotation">@lombok</span>.Setter
+    <span class="directive">private</span> <span 
class="predefined-type">String</span> name;                                    
<i class="conum" data-value="1"></i><b>(1)</b>
+
+    <span class="annotation">@Override</span>
+    <span class="directive">protected</span> <span class="type">void</span> 
execute(<span class="directive">final</span> ExecutionContext ec) {
+        checkParam(<span class="string"><span class="delimiter">"</span><span 
class="content">name</span><span class="delimiter">"</span></span>, ec, <span 
class="predefined-type">String</span>.class);               <i class="conum" 
data-value="2"></i><b>(2)</b>
+        object = wrap(simpleObjectMenu).create(name);
+    }
+
+    <span class="annotation">@lombok</span>.Getter
+    <span class="directive">private</span> SimpleObject object;                
            <i class="conum" data-value="3"></i><b>(3)</b>
+
+    <span class="annotation">@javax</span>.inject.Inject
+    SimpleObjectMenu simpleObjectMenu;
+}</code></pre> 
            </div> 
           </div> 
+          <div class="colist arabic"> 
+           <table> 
+            <tbody>
+             <tr> 
+              <td><i class="conum" data-value="1"></i><b>1</b></td> 
+              <td>The persona class should set this value (copied from its own 
state)</td> 
+             </tr> 
+             <tr> 
+              <td><i class="conum" data-value="2"></i><b>2</b></td> 
+              <td>the inherited "checkParam" is used to ensure that a value is 
set</td> 
+             </tr> 
+             <tr> 
+              <td><i class="conum" data-value="3"></i><b>3</b></td> 
+              <td>the created entity is provided as an output</td> 
+             </tr> 
+            </tbody>
+           </table> 
+          </div> 
           <div class="paragraph"> 
-           <p>Back in the earlier section we noted the 
<code>MultipleExecutionStrategy</code> setting. We can now explain the meaning 
of this: the enum value of <code>EXECUTE</code> is designed for the flat style 
(where every fixture script will be called), whereas the enum value of 
<code>IGNORE</code> is designed for the composite style, and ensures that any 
fixture scripts visited more than once (eg TearDown) are only every executed 
the first time.</p> 
+           <p>This simplifies the integration tests considerably:</p> 
+          </div> 
+          <div class="listingblock"> 
+           <div class="content"> 
+            <pre class="CodeRay highlight"><code data-lang="java"><span 
class="directive">public</span> <span class="type">class</span> <span 
class="class">SimpleObject_IntegTest</span> <span 
class="directive">extends</span> SimpleModuleIntegTestAbstract {
+
+    SimpleObject simpleObject;
+
+    <span class="annotation">@Before</span>
+    <span class="directive">public</span> <span class="type">void</span> 
setUp() {
+        <span class="comment">// given</span>
+        simpleObject = 
fixtureScripts.runBuilderScript(SimpleObject_persona.FOO.builder());
+    }
+
+    <span class="annotation">@Test</span>
+    <span class="directive">public</span> <span class="type">void</span> 
accessible() {
+        <span class="comment">// when</span>
+        <span class="directive">final</span> <span 
class="predefined-type">String</span> name = wrap(simpleObject).getName();
+
+        <span class="comment">// then</span>
+        assertThat(name).isEqualTo(simpleObject.getName());
+    }
+    ...
+}</code></pre> 
+           </div> 
           </div> 
           <div class="paragraph"> 
-           <p>As already noted , the app generated by the <a 
href="../ugfun/ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp 
archetype</a> uses the flat structure, and we feel that it’s a better at 
separating out the "how" (how we set up some graph of domain objects into a 
known state, eg a customer with shipped placed orders and a newly placed order) 
from the "what" (what data should we actually use for the customer’s name, 
say).</p> 
+           <p>Put together, the persona enums provide the "what" - hard-coded 
values for certain key data that the developer becomes very familiar with - 
while the builder provides the "how-to".</p> 
           </div> 
           <div class="paragraph"> 
-           <p>The composite style tends to combine these, which one could 
argue does not separate responsibilities well enough. On the other hand, one 
could also make an argument that the composite style is a good way to implement 
precanned personas, eg "Joe", the customer who has a newly placed order, from 
"Mary" customer who has none.</p> 
+           <p>These builder scripts (<code>BuilderScriptAbstract</code> 
implementations) can be used independently of the enum personas. And for more 
complex entity -where there might be many potential values that need to be 
provided - the builder script can automatically default some or even all of 
these values.</p> 
           </div> 
-          <div class="sect4"> 
-           <h5 id="_further_approaches">Further approaches</h5> 
-           <div class="paragraph"> 
-            <p>As of there are two other approaches.</p> 
-           </div> 
-           <div class="paragraph"> 
-            <p>The first is to take advantage of a new 
<code>MultipleExecutionStrategy</code>, namely 
<code>EXECUTE_ONCE_BY_VALUE</code>. Under this strategy the determination as to 
whether to run a given fixture script is by comparing the fixture script 
against all others that have run. If all fixture scripts implement value 
semantics, then they can effectively determine whether they need to run or 
not.</p> 
-           </div> 
-           <div class="paragraph"> 
-            <p>This strategy was introduced in order to better support the 
<code>ExcelFixture</code> fixture script (provided by the (non-ASF) <a 
href="http://platform.incode.org"; target="_blank">Incode Platform</a>'s excel 
module. The <code>ExcelFixture</code> takes an Excel spreadsheet and loads up 
each row. For those cases where we wish to ensure that the same spreadsheet is 
not loaded more than once, the <code>IGNORE</code> strategy would have required 
that a trivial subclass of <code>ExcelFixture</code> is created for each and 
every spreadsheet. The <code>EXECUTE_ONCE_BY_VALUE</code> on the other hand 
delegates the determination to the value semantics of the 
<code>ExcelFixture</code>, which is based on the contents of the 
spreadsheet.</p> 
-           </div> 
-           <div class="admonitionblock note"> 
-            <table> 
-             <tbody>
-              <tr> 
-               <td class="icon"> <i class="fa icon-note" title="Note"></i> 
</td> 
-               <td class="content"> 
-                <div class="paragraph"> 
-                 <p>Note that as of <code>1.10.0</code> the 
<code>IGNORE</code> enum has been deprecated, replaced by 
<code>EXECUTE_ONCE_BY_CLASS</code></p> 
-                </div> </td> 
-              </tr> 
-             </tbody>
-            </table> 
-           </div> 
-           <div class="paragraph"> 
-            <p>The second approach is in recognition that there is, in fact, 
something of a design flaw with the concept of 
<code>MultipleExecutionStrategy</code>: it requires that all fixture scripts 
being run follow the same conventions. There’s a good argument that this 
shouldn’t be a global "setting": the responsibility for determining whether a 
given fixture script should be executed should reside not in the 
<code>FixtureScripts</code> service but in the <code>FixtureScript</code> 
itself.</p> 
-           </div> 
-           <div class="paragraph"> 
-            <p>Thus, the <code>FixtureScripts.ExecutionContext</code> exposes 
the <code>getPreviouslyExecuted()</code> method that allows the fixture script 
to check for itself which fixture scripts have already been run, and act 
accordingly. For this approach, the <code>MultipleExecutionStrategy</code> 
should be left as simply <code>EXECUTE</code>.</p> 
-           </div> 
+          <div class="paragraph"> 
+           <p>For example, for a customer’s date of birth, the buider could 
default to a date making the customer an adult, aged between 18 and 65, say. 
For an email address or postal address, or an image, or some "lorem ipsum" 
text, the (non-ASF) <a href="http://platform.incode.org"; target="_blank">Incode 
Platform</a>'s fakedata module could provide randomised values.</p> 
+          </div> 
+          <div class="paragraph"> 
+           <p>The benefit of an intelligent builder is that it further 
simplifies the test. The developer reading the test then knows that everything 
that has been specified exactly is of significance. Because non-specified 
values are randomised and change on each run, it also decreases the chance that 
the test passes "by accident" (based on some lucky hard-coded input value).</p> 
+          </div> 
+         </div> 
+        </div> 
+        <div class="sect2"> 
+         <h3 id="_ugtst_fixture-scripts_ticking-clock-fixture">6.2. Ticking 
Clock Fixture (<code>1.16.0-SNAPSHOT</code>)</h3>
+         <div class="btn-group" style="float: right; font-size: small; 
padding: 6px; margin-top: -55px; ">
+          <button type="button" class="btn btn-xs btn-default" 
onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_ticking-clock-fixture.adoc&quot;";><i
 class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
+          <button type="button" class="btn btn-xs btn-default dropdown-toggle" 
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span 
class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
+          <ul class="dropdown-menu">
+           <li><a 
href="https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_ticking-clock-fixture.adoc";
 target="_blank"><i class="fa fa-pencil-square-o fa-fw" 
aria-hidden="true"></i>&nbsp; Edit</a></li>
+           <li><a 
href="https://github.com/apache/isis/commits/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_ticking-clock-fixture.adoc";
 target="_blank"><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i>&nbsp; 
History</a></li>
+           <li><a 
href="https://github.com/apache/isis/raw/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_ticking-clock-fixture.adoc";
 target="_blank"><i class="fa fa-file-text-o fa-fw" 
aria-hidden="true"></i>&nbsp; Raw</a></li>
+           <li><a 
href="https://github.com/apache/isis/blame/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_ticking-clock-fixture.adoc";
 target="_blank"><i class="fa fa-hand-o-right fa-fw" 
aria-hidden="true"></i>&nbsp; Blame</a></li>
+          </ul>
+         </div> 
+         <div class="paragraph"> 
+          <p>The <code>TickingClockFixture</code> is a pre-built fixture 
script that resets the date/time returned by the <a 
href="../rgsvc/rgsvc.html#_rgsvc_api_ClockService"><code>ClockService</code></a>
 to a known value.</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>Thereafter the time returned continues to tick forward (as would 
the real clock) until reset once more.</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>For example, to set the clock to return "3 Sept 2014", use:</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code 
data-lang="java">executionContext.executeChild(<span 
class="local-variable">this</span>, <span class="keyword">new</span> 
TickingClockFixture().setTo(<span class="string"><span 
class="delimiter">"</span><span class="content">2014-09-03</span><span 
class="delimiter">"</span></span>));</code></pre> 
           </div> 
          </div> 
+         <div class="paragraph"> 
+          <p>A variety of format strings are supported; the format 
"YYYY-MM-DD" (as shown above) will work in every locale.</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>The fixture script requires that a 
<code>TickingFixtureClock</code> is initialized during bootstrapping. This is 
done automatically <code>IntegrationTestAbstract3</code> and 
<code>CukeGlueBootstrappingAbstract</code> (BDD specs).</p> 
+         </div> 
         </div> 
         <div class="sect2"> 
-         <h3 id="_ugtst_fixture-scripts_sudo-service">7.2. 
<code>SudoService</code></h3>
+         <h3 id="_ugtst_fixture-scripts_sudo-service">6.3. 
<code>SudoService</code></h3>
          <div class="btn-group" style="float: right; font-size: small; 
padding: 6px; margin-top: -55px; ">
           <button type="button" class="btn btn-xs btn-default" 
onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugtst/_ugtst_fixture-scripts_sudo-service.adoc&quot;";><i
 class="fa fa-pencil-square-o"></i>&nbsp;Edit</button>
           <button type="button" class="btn btn-xs btn-default dropdown-toggle" 
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span 
class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>

Reply via email to