[ 
https://issues.apache.org/jira/browse/ISIS-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16546084#comment-16546084
 ] 

ASF GitHub Bot commented on ISIS-1967:
--------------------------------------

andi-huber closed pull request #114: ISIS-1967: Add tests from Diffblue Deeptest
URL: https://github.com/apache/isis/pull/114
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/core/applib-legacy/src/test/java/org/apache/isis/applib/util/TitleBuffertruncate000Test.java
 
b/core/applib-legacy/src/test/java/org/apache/isis/applib/util/TitleBuffertruncate000Test.java
new file mode 100644
index 0000000000..8aa94941ab
--- /dev/null
+++ 
b/core/applib-legacy/src/test/java/org/apache/isis/applib/util/TitleBuffertruncate000Test.java
@@ -0,0 +1,71 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.util;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class TitleBuffertruncate000Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: org/apache/isis/applib/util/TitleBuffer.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 447 branch to line 450
+   * org/apache/isis/applib/util/TitleBuffer.java:457: loop: 1 iterations
+   * iteration 1
+   * conditional line 453 branch to line 454
+   * conditional line 454 branch to line 455
+   * conditional line 459 branch to line 464
+   */
+
+  @Test
+  public void 
org_apache_isis_applib_util_TitleBuffer_truncate_000_14370fda2a05a347() throws 
Throwable {
+
+    org.apache.isis.applib.util.TitleBuffer retval;
+    {
+      /* Arrange */
+      org.apache.isis.applib.util.TitleBuffer param_1 = 
(org.apache.isis.applib.util.TitleBuffer) 
Reflector.getInstance("org.apache.isis.applib.util.TitleBuffer");
+      Reflector.setField(param_1, "title", new StringBuilder(" "));
+      int noWords = 2;
+
+      /* Act */
+      retval = param_1.truncate(noWords);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertNotNull(((StringBuilder) Reflector.getInstanceField(retval, 
"title")));
+      Assert.assertNotNull(((StringBuilder) Reflector.getInstanceField(retval, 
"title")));
+      Assert.assertEquals(" ", ((StringBuilder) 
Reflector.getInstanceField(retval, "title")).toString());
+    }
+  }
+}
diff --git 
a/core/applib-legacy/src/test/java/org/apache/isis/applib/util/TitleBuffertruncate001Test.java
 
b/core/applib-legacy/src/test/java/org/apache/isis/applib/util/TitleBuffertruncate001Test.java
new file mode 100644
index 0000000000..55eb2aebfe
--- /dev/null
+++ 
b/core/applib-legacy/src/test/java/org/apache/isis/applib/util/TitleBuffertruncate001Test.java
@@ -0,0 +1,80 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.util;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class TitleBuffertruncate001Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: org/apache/isis/applib/util/TitleBuffer.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 1 (line 447)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 6 (line 450)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 7 (line 451)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 8 (line 453)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 9 (line 453)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 11 (line 453)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 12 (line 454)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 13 (line 454)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 15 (line 455)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 16 (line 457)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 17 (line 459)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 18 (line 459)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 20 (line 460)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 21 (line 462)
+   * This test covers `org.apache.isis.applib.util.TitleBuffer truncate(int)' 
block 22 (line 464)
+
+   */
+
+  @Test
+  public void 
org_apache_isis_applib_util_TitleBuffer_truncate_001_6089b85b64e1c3a5() throws 
Throwable {
+
+    org.apache.isis.applib.util.TitleBuffer retval;
+    {
+      /* Arrange */
+      org.apache.isis.applib.util.TitleBuffer param_1 = 
(org.apache.isis.applib.util.TitleBuffer) 
Reflector.getInstance("org.apache.isis.applib.util.TitleBuffer");
+      Reflector.setField(param_1, "title", new StringBuilder(" %$$$$$$$"));
+      int noWords = 1;
+
+      /* Act */
+      retval = param_1.truncate(noWords);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertNotNull(((StringBuilder) Reflector.getInstanceField(retval, 
"title")));
+      Assert.assertNotNull(((StringBuilder) Reflector.getInstanceField(retval, 
"title")));
+      Assert.assertEquals("...", ((StringBuilder) 
Reflector.getInstanceField(retval, "title")).toString());
+    }
+  }
+}
diff --git 
a/core/applib-legacy/src/test/java/org/apache/isis/applib/util/TitleBuffertruncate002Test.java
 
b/core/applib-legacy/src/test/java/org/apache/isis/applib/util/TitleBuffertruncate002Test.java
new file mode 100644
index 0000000000..d0237529c3
--- /dev/null
+++ 
b/core/applib-legacy/src/test/java/org/apache/isis/applib/util/TitleBuffertruncate002Test.java
@@ -0,0 +1,71 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.util;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class TitleBuffertruncate002Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: org/apache/isis/applib/util/TitleBuffer.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 447 branch to line 450
+   * org/apache/isis/applib/util/TitleBuffer.java:457: loop: 1 iterations
+   * iteration 1
+   * conditional line 453 branch to line 454
+   * conditional line 454 branch to line 457
+   * conditional line 459 branch to line 464
+   */
+
+  @Test
+  public void 
org_apache_isis_applib_util_TitleBuffer_truncate_002_bc48a3caeb173bd3() throws 
Throwable {
+
+    org.apache.isis.applib.util.TitleBuffer retval;
+    {
+      /* Arrange */
+      org.apache.isis.applib.util.TitleBuffer param_1 = 
(org.apache.isis.applib.util.TitleBuffer) 
Reflector.getInstance("org.apache.isis.applib.util.TitleBuffer");
+      Reflector.setField(param_1, "title", new StringBuilder("`"));
+      int noWords = 1;
+
+      /* Act */
+      retval = param_1.truncate(noWords);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertNotNull(((StringBuilder) Reflector.getInstanceField(retval, 
"title")));
+      Assert.assertNotNull(((StringBuilder) Reflector.getInstanceField(retval, 
"title")));
+      Assert.assertEquals("`", ((StringBuilder) 
Reflector.getInstanceField(retval, "title")).toString());
+    }
+  }
+}
diff --git 
a/core/applib/src/test/java/org/apache/isis/applib/internal/base/Bytesprepend001Test.java
 
b/core/applib/src/test/java/org/apache/isis/applib/internal/base/Bytesprepend001Test.java
new file mode 100644
index 0000000000..17194bd0f5
--- /dev/null
+++ 
b/core/applib/src/test/java/org/apache/isis/applib/internal/base/Bytesprepend001Test.java
@@ -0,0 +1,65 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.internal.base;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class Bytesprepend001Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: org/apache/isis/applib/internal/base/_Bytes.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 84 branch to line 85
+   * conditional line 85 branch to line 88
+   * conditional line 88 branch to line 88
+   */
+
+  @Test
+  public void 
org_apache_isis_applib_internal_base__Bytes_prepend_001_8ef33eec105cda50() 
throws Throwable {
+
+    byte [] retval;
+    {
+      /* Arrange */
+      byte [] target = null;
+      byte[] bytes = { (byte)1 };
+
+      /* Act */
+      retval = org.apache.isis.applib.internal.base._Bytes.prepend(target, 
bytes);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertArrayEquals(new byte []{ (byte)1 }, retval);
+    }
+  }
+}
diff --git 
a/core/applib/src/test/java/org/apache/isis/applib/internal/base/Bytesprepend002Test.java
 
b/core/applib/src/test/java/org/apache/isis/applib/internal/base/Bytesprepend002Test.java
new file mode 100644
index 0000000000..eced00a1fa
--- /dev/null
+++ 
b/core/applib/src/test/java/org/apache/isis/applib/internal/base/Bytesprepend002Test.java
@@ -0,0 +1,66 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.internal.base;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class Bytesprepend002Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: org/apache/isis/applib/internal/base/_Bytes.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 84 branch to line 90
+   * conditional line 90 branch to line 93
+   * conditional line 94 branch to line 95
+   * conditional line 95 branch to line 96
+   */
+
+  @Test
+  public void 
org_apache_isis_applib_internal_base__Bytes_prepend_002_32f1e5cacc62397() 
throws Throwable {
+
+    byte [] retval;
+    {
+      /* Arrange */
+      byte[] target = { };
+      byte[] bytes = { (byte)0 };
+
+      /* Act */
+      retval = org.apache.isis.applib.internal.base._Bytes.prepend(target, 
bytes);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertArrayEquals(new byte []{ (byte)0 }, retval);
+    }
+  }
+}
diff --git 
a/core/applib/src/test/java/org/apache/isis/applib/services/layout/UtilwithSuffix000Test.java
 
b/core/applib/src/test/java/org/apache/isis/applib/services/layout/UtilwithSuffix000Test.java
new file mode 100644
index 0000000000..99c330d3e7
--- /dev/null
+++ 
b/core/applib/src/test/java/org/apache/isis/applib/services/layout/UtilwithSuffix000Test.java
@@ -0,0 +1,67 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.services.layout;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class UtilwithSuffix000Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: org/apache/isis/applib/services/layout/Util.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 24 branch to line 27
+   * conditional line 27 branch to line 28
+   */
+
+  @Test
+  public void 
org_apache_isis_applib_services_layout_Util_withSuffix_000_cb83fd06ee736dd5() 
throws Throwable {
+
+    String retval;
+    {
+      /* Arrange */
+      String fileName = "T<U";
+      String suffix = ".///";
+
+      /* Act */
+      Class<?> c = 
Reflector.forName("org.apache.isis.applib.services.layout.Util");
+      Method m = c.getDeclaredMethod("withSuffix", 
Reflector.forName("java.lang.String"), Reflector.forName("java.lang.String"));
+      m.setAccessible(true);
+      retval = (String) m.invoke(null, fileName, suffix);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertEquals("T<U.///", retval);
+    }
+  }
+}
diff --git 
a/core/applib/src/test/java/org/apache/isis/applib/services/layout/UtilwithSuffix001Test.java
 
b/core/applib/src/test/java/org/apache/isis/applib/services/layout/UtilwithSuffix001Test.java
new file mode 100644
index 0000000000..1740bbee39
--- /dev/null
+++ 
b/core/applib/src/test/java/org/apache/isis/applib/services/layout/UtilwithSuffix001Test.java
@@ -0,0 +1,67 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.applib.services.layout;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class UtilwithSuffix001Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: org/apache/isis/applib/services/layout/Util.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 24 branch to line 25
+   * conditional line 27 branch to line 28
+   */
+
+  @Test
+  public void 
org_apache_isis_applib_services_layout_Util_withSuffix_001_29270d11ce3f30d0() 
throws Throwable {
+
+    String retval;
+    {
+      /* Arrange */
+      String fileName = "U";
+      String suffix = " !!";
+
+      /* Act */
+      Class<?> c = 
Reflector.forName("org.apache.isis.applib.services.layout.Util");
+      Method m = c.getDeclaredMethod("withSuffix", 
Reflector.forName("java.lang.String"), Reflector.forName("java.lang.String"));
+      m.setAccessible(true);
+      retval = (String) m.invoke(null, fileName, suffix);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertEquals("U. !!", retval);
+    }
+  }
+}
diff --git 
a/core/metamodel/src/test/java/org/apache/isis/core/commons/lang/StringExtensionsasPluralName000Test.java
 
b/core/metamodel/src/test/java/org/apache/isis/core/commons/lang/StringExtensionsasPluralName000Test.java
new file mode 100644
index 0000000000..95bb6546e3
--- /dev/null
+++ 
b/core/metamodel/src/test/java/org/apache/isis/core/commons/lang/StringExtensionsasPluralName000Test.java
@@ -0,0 +1,64 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.commons.lang;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class StringExtensionsasPluralName000Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: org/apache/isis/core/commons/lang/StringExtensions.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 376 branch to line 378
+   * conditional line 378 branch to line 378
+   * conditional line 378 branch to line 379
+   */
+
+  @Test
+  public void 
org_apache_isis_core_commons_lang_StringExtensions_asPluralName_000_a9a562c540ea6c42()
 throws Throwable {
+
+    String retval;
+    {
+      /* Arrange */
+      String extendee = "yyyyyyyx";
+
+      /* Act */
+      retval = 
org.apache.isis.core.commons.lang.StringExtensions.asPluralName(extendee);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertEquals("yyyyyyyxes", retval);
+    }
+  }
+}
diff --git 
a/core/metamodel/src/test/java/org/apache/isis/core/commons/lang/StringExtensionsasPluralName001Test.java
 
b/core/metamodel/src/test/java/org/apache/isis/core/commons/lang/StringExtensionsasPluralName001Test.java
new file mode 100644
index 0000000000..4d3dd0de1c
--- /dev/null
+++ 
b/core/metamodel/src/test/java/org/apache/isis/core/commons/lang/StringExtensionsasPluralName001Test.java
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.commons.lang;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class StringExtensionsasPluralName001Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: org/apache/isis/core/commons/lang/StringExtensions.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 376 branch to line 378
+   * conditional line 378 branch to line 379
+   */
+
+  @Test
+  public void 
org_apache_isis_core_commons_lang_StringExtensions_asPluralName_001_e8c7006afa499a40()
 throws Throwable {
+
+    String retval;
+    {
+      /* Arrange */
+      String extendee = "yyyyyyys";
+
+      /* Act */
+      retval = 
org.apache.isis.core.commons.lang.StringExtensions.asPluralName(extendee);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertEquals("yyyyyyyses", retval);
+    }
+  }
+}
diff --git 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/spec/ObjectSpecificationsorder001Test.java
 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/spec/ObjectSpecificationsorder001Test.java
new file mode 100644
index 0000000000..59699f31dc
--- /dev/null
+++ 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/spec/ObjectSpecificationsorder001Test.java
@@ -0,0 +1,79 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.metamodel.spec;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class ObjectSpecificationsorder001Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/core/metamodel/spec/ObjectSpecifications.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 72 branch to line 72
+
+   * conditional line 72 branch to line 72
+   * conditional line 73 branch to line 73
+   * conditional line 73 branch to line 75
+   * conditional line 75 branch to line 75
+   * conditional line 76 branch to line 76
+   * conditional line 76 branch to line 78
+
+   * conditional line 72 branch to line 80
+   */
+
+  @Test
+  public void 
org_apache_isis_core_metamodel_spec_ObjectSpecifications_order_001_672b722b884486bc()
 throws Throwable {
+
+    java.util.List<String> retval;
+    {
+      /* Arrange */
+      java.util.ArrayList valuesToOrder = new java.util.ArrayList();
+      valuesToOrder.add("??");
+      java.util.ArrayList valuesInRequiredOrder = new java.util.ArrayList();
+      valuesInRequiredOrder.add("??");
+
+      /* Act */
+      Class<?> c = 
Reflector.forName("org.apache.isis.core.metamodel.spec.ObjectSpecifications");
+      Method m = c.getDeclaredMethod("order", 
Reflector.forName("java.util.List"), Reflector.forName("java.util.List"));
+      m.setAccessible(true);
+      retval = (java.util.List<String>) m.invoke(null, valuesToOrder, 
valuesInRequiredOrder);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      java.util.ArrayList arrayList = new java.util.ArrayList();
+      arrayList.add("??");
+      Assert.assertEquals(arrayList, retval);
+    }
+  }
+}
diff --git 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributeeaddElementToArray000Test.java
 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributeeaddElementToArray000Test.java
new file mode 100644
index 0000000000..90e5a8426b
--- /dev/null
+++ 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributeeaddElementToArray000Test.java
@@ -0,0 +1,69 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.metamodel.specloader.specimpl;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class ObjectActionContributeeaddElementToArray000Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java 
*/
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 275 branch to line 275
+   */
+
+  @Test
+  public void 
org_apache_isis_core_metamodel_specloader_specimpl_ObjectActionContributee_addElementToArray_000_723fae8909b8f2c9()
 throws Throwable {
+
+    Object [] retval;
+    {
+      /* Arrange */
+      Object [] array = null;
+      int n = -2147483648;
+      Object element = null;
+      Object [] type = null;
+
+      /* Act */
+      thrown.expect(NullPointerException.class);
+      try {
+        Class<?> c = 
Reflector.forName("org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionContributee");
+        Method m = c.getDeclaredMethod("addElementToArray", 
Reflector.forName("java.lang.Object []"), Reflector.forName("int"), 
Reflector.forName("java.lang.Object"), Reflector.forName("java.lang.Object 
[]"));
+        m.setAccessible(true);
+        retval = (Object []) m.invoke(null, array, n, element, type);
+      } catch(InvocationTargetException ex) {
+        throw ex.getCause();
+      }
+
+    /* Method is not expected to return due to exception thrown */  }
+  }
+}
diff --git 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributeeaddElementToArray001Test.java
 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributeeaddElementToArray001Test.java
new file mode 100644
index 0000000000..a74c82b73c
--- /dev/null
+++ 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributeeaddElementToArray001Test.java
@@ -0,0 +1,80 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.metamodel.specloader.specimpl;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+@org.junit.runner.RunWith(org.powermock.modules.junit4.PowerMockRunner.class)
+public class ObjectActionContributeeaddElementToArray001Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java 
*/
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 275 branch to line 275
+   * conditional line 276 branch to line 276
+   */
+  @org.powermock.core.classloader.annotations.PrepareForTest( { 
com.google.common.collect.Lists.class } )
+  @Test
+  public void 
org_apache_isis_core_metamodel_specloader_specimpl_ObjectActionContributee_addElementToArray_001_ed958a494e46bcbc()
 throws Throwable {
+
+    Object [] retval;
+    {
+      /* Setup mocks */
+      java.util.ArrayList mock_instance = new java.util.ArrayList();
+      
org.powermock.api.mockito.PowerMockito.mockStatic(com.google.common.collect.Lists.class);
+      final java.util.ArrayList 
com_google_common_collect_Lists_newArrayList_Iterable_answer_list = new 
java.util.ArrayList();
+      final java.util.ArrayList<Object[]> 
com_google_common_collect_Lists_newArrayList_Iterable_expectation_list = new 
java.util.ArrayList<Object[]>();
+      final com.diffblue.deeptestutils.IterAnswer 
com_google_common_collect_Lists_newArrayList_Iterable_answer_object = new 
com.diffblue.deeptestutils.IterAnswer("com.google.common.collect.Lists", 
"newArrayList", 
com_google_common_collect_Lists_newArrayList_Iterable_answer_list, 
com_google_common_collect_Lists_newArrayList_Iterable_expectation_list);
+      
com_google_common_collect_Lists_newArrayList_Iterable_answer_list.add(mock_instance);
+      
org.mockito.Mockito.when(com.google.common.collect.Lists.newArrayList(org.mockito.AdditionalMatchers.or(org.mockito.Matchers.isA(Iterable.class),
 
org.mockito.Matchers.isNull(Iterable.class)))).thenAnswer(com_google_common_collect_Lists_newArrayList_Iterable_answer_object);
+
+      /* Arrange */
+      java.lang.Object[] array = { null };
+      int n = -1073741824;
+      Object element = null;
+      Object [] type = null;
+
+      /* Act */
+      thrown.expect(IndexOutOfBoundsException.class);
+      try {
+        Class<?> c = 
Reflector.forName("org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionContributee");
+        Method m = c.getDeclaredMethod("addElementToArray", 
Reflector.forName("java.lang.Object []"), Reflector.forName("int"), 
Reflector.forName("java.lang.Object"), Reflector.forName("java.lang.Object 
[]"));
+        m.setAccessible(true);
+        retval = (Object []) m.invoke(null, array, n, element, type);
+      } catch(InvocationTargetException ex) {
+        throw ex.getCause();
+      }
+
+    /* Method is not expected to return due to exception thrown */  }
+  }
+}
diff --git 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributeeremoveElementFromArray000Test.java
 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributeeremoveElementFromArray000Test.java
new file mode 100644
index 0000000000..62a9e4e9b5
--- /dev/null
+++ 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributeeremoveElementFromArray000Test.java
@@ -0,0 +1,68 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.metamodel.specloader.specimpl;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class ObjectActionContributeeremoveElementFromArray000Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java 
*/
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 281 branch to line 281
+   */
+
+  @Test
+  public void 
org_apache_isis_core_metamodel_specloader_specimpl_ObjectActionContributee_removeElementFromArray_000_c6b2061c5531d000()
 throws Throwable {
+
+    Object [] retval;
+    {
+      /* Arrange */
+      Object [] array = null;
+      int n = 0;
+      Object [] t = null;
+
+      /* Act */
+      thrown.expect(NullPointerException.class);
+      try {
+        Class<?> c = 
Reflector.forName("org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionContributee");
+        Method m = c.getDeclaredMethod("removeElementFromArray", 
Reflector.forName("java.lang.Object []"), Reflector.forName("int"), 
Reflector.forName("java.lang.Object []"));
+        m.setAccessible(true);
+        retval = (Object []) m.invoke(null, array, n, t);
+      } catch(InvocationTargetException ex) {
+        throw ex.getCause();
+      }
+
+    /* Method is not expected to return due to exception thrown */  }
+  }
+}
diff --git a/core/pom.xml b/core/pom.xml
index 6886ee931e..5f5053e80f 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -2173,6 +2173,23 @@ ${license.additional-notes}
             <artifactId>jmock-junit4</artifactId>
             <scope>test</scope>
         </dependency>
+       <dependency>
+           <groupId>org.powermock</groupId>
+           <artifactId>powermock-module-junit4</artifactId>
+           <version>1.6.6</version>
+           <scope>test</scope>
+       </dependency>
+       <dependency>
+           <groupId>org.mockito</groupId>
+           <artifactId>mockito-all</artifactId>
+           <version>1.10.19</version>
+           <scope>test</scope>
+       </dependency>
+       <dependency>
+           <groupId>com.diffblue</groupId>
+           <artifactId>deeptestutils</artifactId>
+           <version>1.2.0</version>
+       </dependency>
     </dependencies>
 
        <profiles>
diff --git 
a/core/runtime/src/test/java/org/apache/isis/core/runtime/system/persistence/PersistenceQueryFactorywrap000Test.java
 
b/core/runtime/src/test/java/org/apache/isis/core/runtime/system/persistence/PersistenceQueryFactorywrap000Test.java
new file mode 100644
index 0000000000..96cd35460d
--- /dev/null
+++ 
b/core/runtime/src/test/java/org/apache/isis/core/runtime/system/persistence/PersistenceQueryFactorywrap000Test.java
@@ -0,0 +1,86 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.runtime.system.persistence;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+@org.junit.runner.RunWith(org.powermock.modules.junit4.PowerMockRunner.class)
+public class PersistenceQueryFactorywrap000Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/core/runtime/system/persistence/PersistenceQueryFactory.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test covers `java.util.Map wrap(java.util.Map)' block 2 (line 78)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 3 (line 78)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 4 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 5 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 6 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 7 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 8 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 9 (line 85)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 25 (line 85)
+
+   */
+  @org.powermock.core.classloader.annotations.PrepareForTest( { 
com.google.common.collect.Maps.class } )
+  @Test
+  public void 
org_apache_isis_core_runtime_system_persistence_PersistenceQueryFactory_wrap_000_f89a9e7fd00aa834()
 throws Throwable {
+
+    java.util.Map<String, 
org.apache.isis.core.metamodel.adapter.ObjectAdapter> retval;
+    {
+      /* Setup mocks */
+      
org.powermock.api.mockito.PowerMockito.mockStatic(com.google.common.collect.Maps.class);
+      final java.util.ArrayList 
com_google_common_collect_Maps_newHashMap_answer_list = new 
java.util.ArrayList();
+      final java.util.ArrayList<Object[]> 
com_google_common_collect_Maps_newHashMap_expectation_list = new 
java.util.ArrayList<Object[]>();
+      final com.diffblue.deeptestutils.IterAnswer 
com_google_common_collect_Maps_newHashMap_answer_object = new 
com.diffblue.deeptestutils.IterAnswer("com.google.common.collect.Maps", 
"newHashMap", com_google_common_collect_Maps_newHashMap_answer_list, 
com_google_common_collect_Maps_newHashMap_expectation_list);
+      com_google_common_collect_Maps_newHashMap_answer_list.add(null);
+      
org.mockito.Mockito.when(com.google.common.collect.Maps.newHashMap()).thenAnswer(com_google_common_collect_Maps_newHashMap_answer_object);
+
+      /* Arrange */
+      org.apache.isis.core.runtime.system.persistence.PersistenceQueryFactory 
param_4 = 
(org.apache.isis.core.runtime.system.persistence.PersistenceQueryFactory) 
Reflector.getInstance("org.apache.isis.core.runtime.system.persistence.PersistenceQueryFactory");
+      org.apache.isis.core.metamodel.adapter.mgr.AdapterManager adapterManager 
= (org.apache.isis.core.metamodel.adapter.mgr.AdapterManager) 
Reflector.getInstance("org.apache.isis.core.metamodel.adapter.mgr.AdapterManager");
+      Reflector.setField(param_4, "adapterManager", adapterManager);
+      org.apache.isis.core.metamodel.specloader.SpecificationLoader 
specificationLoader = 
(org.apache.isis.core.metamodel.specloader.SpecificationLoader) 
Reflector.getInstance("org.apache.isis.core.metamodel.specloader.SpecificationLoader");
+      Reflector.setField(param_4, "specificationLoader", specificationLoader);
+      java.util.HashMap argumentsByParameterName = new java.util.HashMap();
+
+      /* Act */
+      Class<?> c = 
Reflector.forName("org.apache.isis.core.runtime.system.persistence.PersistenceQueryFactory");
+      Method m = c.getDeclaredMethod("wrap", 
Reflector.forName("java.util.Map"));
+      m.setAccessible(true);
+      retval = (java.util.Map<String, 
org.apache.isis.core.metamodel.adapter.ObjectAdapter>) m.invoke(param_4, 
argumentsByParameterName);
+    }
+    {
+      /* Assert result */
+      Assert.assertEquals(null, retval);
+    }
+  }
+}
diff --git 
a/core/runtime/src/test/java/org/apache/isis/core/runtime/system/persistence/PersistenceQueryFactorywrap001Test.java
 
b/core/runtime/src/test/java/org/apache/isis/core/runtime/system/persistence/PersistenceQueryFactorywrap001Test.java
new file mode 100644
index 0000000000..b88c378916
--- /dev/null
+++ 
b/core/runtime/src/test/java/org/apache/isis/core/runtime/system/persistence/PersistenceQueryFactorywrap001Test.java
@@ -0,0 +1,104 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.runtime.system.persistence;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+@org.junit.runner.RunWith(org.powermock.modules.junit4.PowerMockRunner.class)
+public class PersistenceQueryFactorywrap001Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/core/runtime/system/persistence/PersistenceQueryFactory.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test covers `java.util.Map wrap(java.util.Map)' block 2 (line 78)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 3 (line 78)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 4 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 5 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 6 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 7 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 8 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 9 (line 85)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 10 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 11 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 12 (line 79)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 13 (line 80)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 14 (line 80)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 15 (line 80)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 16 (line 81)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 17 (line 81)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 18 (line 82)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 19 (line 82)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 22 (line 82)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 23 (line 83)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 24 (line 84)
+   * This test covers `java.util.Map wrap(java.util.Map)' block 25 (line 85)
+
+   */
+  @org.powermock.core.classloader.annotations.PrepareForTest( { 
com.google.common.collect.Maps.class } )
+  @Test
+  public void 
org_apache_isis_core_runtime_system_persistence_PersistenceQueryFactory_wrap_001_fc090e78f7993a69()
 throws Throwable {
+
+    java.util.Map<String, 
org.apache.isis.core.metamodel.adapter.ObjectAdapter> retval;
+    {
+      /* Setup mocks */
+      java.util.HashMap mock_instance = new java.util.HashMap();
+      
org.powermock.api.mockito.PowerMockito.mockStatic(com.google.common.collect.Maps.class);
+      final java.util.ArrayList 
com_google_common_collect_Maps_newHashMap_answer_list = new 
java.util.ArrayList();
+      final java.util.ArrayList<Object[]> 
com_google_common_collect_Maps_newHashMap_expectation_list = new 
java.util.ArrayList<Object[]>();
+      final com.diffblue.deeptestutils.IterAnswer 
com_google_common_collect_Maps_newHashMap_answer_object = new 
com.diffblue.deeptestutils.IterAnswer("com.google.common.collect.Maps", 
"newHashMap", com_google_common_collect_Maps_newHashMap_answer_list, 
com_google_common_collect_Maps_newHashMap_expectation_list);
+      com_google_common_collect_Maps_newHashMap_answer_list.add(mock_instance);
+      
org.mockito.Mockito.when(com.google.common.collect.Maps.newHashMap()).thenAnswer(com_google_common_collect_Maps_newHashMap_answer_object);
+
+      /* Arrange */
+      org.apache.isis.core.runtime.system.persistence.PersistenceQueryFactory 
param_5 = 
(org.apache.isis.core.runtime.system.persistence.PersistenceQueryFactory) 
Reflector.getInstance("org.apache.isis.core.runtime.system.persistence.PersistenceQueryFactory");
+      org.apache.isis.core.metamodel.adapter.mgr.AdapterManager adapterManager 
= (org.apache.isis.core.metamodel.adapter.mgr.AdapterManager) 
Reflector.getInstance("org.apache.isis.core.metamodel.adapter.mgr.AdapterManager");
+      Reflector.setField(param_5, "adapterManager", adapterManager);
+      org.apache.isis.core.metamodel.specloader.SpecificationLoader 
specificationLoader = 
(org.apache.isis.core.metamodel.specloader.SpecificationLoader) 
Reflector.getInstance("org.apache.isis.core.metamodel.specloader.SpecificationLoader");
+      Reflector.setField(param_5, "specificationLoader", specificationLoader);
+      java.util.HashMap argumentsByParameterName = new java.util.HashMap();
+      argumentsByParameterName.put(null, null);
+
+      /* Act */
+      Class<?> c = 
Reflector.forName("org.apache.isis.core.runtime.system.persistence.PersistenceQueryFactory");
+      Method m = c.getDeclaredMethod("wrap", 
Reflector.forName("java.util.Map"));
+      m.setAccessible(true);
+      retval = (java.util.Map<String, 
org.apache.isis.core.metamodel.adapter.ObjectAdapter>) m.invoke(param_5, 
argumentsByParameterName);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      java.util.HashMap hashMap = new java.util.HashMap();
+      hashMap.put(null, null);
+      Assert.assertEquals(hashMap, retval);
+    }
+  }
+}
diff --git 
a/core/viewer-restfulobjects-rendering/src/test/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstractsanitize000Test.java
 
b/core/viewer-restfulobjects-rendering/src/test/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstractsanitize000Test.java
new file mode 100644
index 0000000000..4bd72f0db8
--- /dev/null
+++ 
b/core/viewer-restfulobjects-rendering/src/test/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstractsanitize000Test.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 org.apache.isis.viewer.restfulobjects.rendering.service.conneg;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class ContentNegotiationServiceAbstractsanitize000Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstract.java
 */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 145 branch to line 148
+   * conditional line 149 branch to line 150
+   * conditional line 150 branch to line 150
+   * conditional line 152 branch to line 155
+   */
+
+  @Test
+  public void 
org_apache_isis_viewer_restfulobjects_rendering_service_conneg_ContentNegotiationServiceAbstract_sanitize_000_bff9a43970768adc()
 throws Throwable {
+
+    String retval;
+    {
+      /* Arrange */
+      
org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceOrgApacheIsisV1
 param_3 = 
(org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceOrgApacheIsisV1)
 
Reflector.getInstance("org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceOrgApacheIsisV1");
+      
org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceForRestfulObjectsV1_0
 contentNegotiationServiceForRestfulObjectsV1_0 = 
(org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceForRestfulObjectsV1_0)
 
Reflector.getInstance("org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceForRestfulObjectsV1_0");
+      Reflector.setField(contentNegotiationServiceForRestfulObjectsV1_0, 
"strictAcceptChecking", false);
+      Reflector.setField(param_3, "restfulObjectsV1_0", 
contentNegotiationServiceForRestfulObjectsV1_0);
+      Reflector.setField(param_3, "container", null);
+      String mediaParam = " \'   !!!! ";
+
+      /* Act */
+      Class<?> c = 
Reflector.forName("org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceAbstract");
+      Method m = c.getDeclaredMethod("sanitize", 
Reflector.forName("java.lang.String"));
+      m.setAccessible(true);
+      retval = (String) m.invoke(param_3, mediaParam);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertEquals("   !!!!", retval);
+    }
+  }
+}
diff --git 
a/core/viewer-restfulobjects-rendering/src/test/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstractsanitize001Test.java
 
b/core/viewer-restfulobjects-rendering/src/test/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstractsanitize001Test.java
new file mode 100644
index 0000000000..04a9ef6d21
--- /dev/null
+++ 
b/core/viewer-restfulobjects-rendering/src/test/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstractsanitize001Test.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 org.apache.isis.viewer.restfulobjects.rendering.service.conneg;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class ContentNegotiationServiceAbstractsanitize001Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstract.java
 */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 145 branch to line 148
+   * conditional line 149 branch to line 152
+   * conditional line 152 branch to line 153
+   * conditional line 153 branch to line 153
+   */
+
+  @Test
+  public void 
org_apache_isis_viewer_restfulobjects_rendering_service_conneg_ContentNegotiationServiceAbstract_sanitize_001_2a0ac26732b6d2a9()
 throws Throwable {
+
+    String retval;
+    {
+      /* Arrange */
+      
org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceOrgApacheIsisV1
 param_3 = 
(org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceOrgApacheIsisV1)
 
Reflector.getInstance("org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceOrgApacheIsisV1");
+      
org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceForRestfulObjectsV1_0
 contentNegotiationServiceForRestfulObjectsV1_0 = 
(org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceForRestfulObjectsV1_0)
 
Reflector.getInstance("org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceForRestfulObjectsV1_0");
+      Reflector.setField(contentNegotiationServiceForRestfulObjectsV1_0, 
"strictAcceptChecking", false);
+      Reflector.setField(param_3, "restfulObjectsV1_0", 
contentNegotiationServiceForRestfulObjectsV1_0);
+      Reflector.setField(param_3, "container", null);
+      String mediaParam = " g4`\'@Aa\' ";
+
+      /* Act */
+      Class<?> c = 
Reflector.forName("org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceAbstract");
+      Method m = c.getDeclaredMethod("sanitize", 
Reflector.forName("java.lang.String"));
+      m.setAccessible(true);
+      retval = (String) m.invoke(param_3, mediaParam);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertEquals("g4`\'@Aa", retval);
+    }
+  }
+}
diff --git 
a/core/viewer-restfulobjects-rendering/src/test/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstractsanitize002Test.java
 
b/core/viewer-restfulobjects-rendering/src/test/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstractsanitize002Test.java
new file mode 100644
index 0000000000..e873c879e0
--- /dev/null
+++ 
b/core/viewer-restfulobjects-rendering/src/test/java/org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstractsanitize002Test.java
@@ -0,0 +1,69 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.rendering.service.conneg;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+public class ContentNegotiationServiceAbstractsanitize002Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/viewer/restfulobjects/rendering/service/conneg/ContentNegotiationServiceAbstract.java
 */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 145 branch to line 146
+   */
+
+  @Test
+  public void 
org_apache_isis_viewer_restfulobjects_rendering_service_conneg_ContentNegotiationServiceAbstract_sanitize_002_7800a85975c40613()
 throws Throwable {
+
+    String retval;
+    {
+      /* Arrange */
+      
org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceOrgApacheIsisV1
 param_1 = 
(org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceOrgApacheIsisV1)
 
Reflector.getInstance("org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceOrgApacheIsisV1");
+      
org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceForRestfulObjectsV1_0
 contentNegotiationServiceForRestfulObjectsV1_0 = 
(org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceForRestfulObjectsV1_0)
 
Reflector.getInstance("org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceForRestfulObjectsV1_0");
+      Reflector.setField(contentNegotiationServiceForRestfulObjectsV1_0, 
"strictAcceptChecking", false);
+      Reflector.setField(param_1, "restfulObjectsV1_0", 
contentNegotiationServiceForRestfulObjectsV1_0);
+      Reflector.setField(param_1, "container", null);
+      String mediaParam = null;
+
+      /* Act */
+      Class<?> c = 
Reflector.forName("org.apache.isis.viewer.restfulobjects.rendering.service.conneg.ContentNegotiationServiceAbstract");
+      Method m = c.getDeclaredMethod("sanitize", 
Reflector.forName("java.lang.String"));
+      m.setAccessible(true);
+      retval = (String) m.invoke(param_1, mediaParam);
+    }
+    {
+      /* Assert result */
+      Assert.assertEquals(null, retval);
+    }
+  }
+}
diff --git 
a/core/viewer-restfulobjects-server/src/test/java/org/apache/isis/viewer/restfulobjects/server/ResourceContextstripQuotes001Test.java
 
b/core/viewer-restfulobjects-server/src/test/java/org/apache/isis/viewer/restfulobjects/server/ResourceContextstripQuotes001Test.java
new file mode 100644
index 0000000000..73b29f5d5f
--- /dev/null
+++ 
b/core/viewer-restfulobjects-server/src/test/java/org/apache/isis/viewer/restfulobjects/server/ResourceContextstripQuotes001Test.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 org.apache.isis.viewer.restfulobjects.server;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+@org.junit.runner.RunWith(org.powermock.modules.junit4.PowerMockRunner.class)
+public class ResourceContextstripQuotes001Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/viewer/restfulobjects/server/ResourceContext.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 202 branch to line 205
+   * conditional line 205 branch to line 205
+   * conditional line 205 branch to line 208
+   */
+  @org.powermock.core.classloader.annotations.PrepareForTest( { 
com.google.common.base.Strings.class } )
+  @Test
+  public void 
org_apache_isis_viewer_restfulobjects_server_ResourceContext_stripQuotes_001_a2748888b7c22553()
 throws Throwable {
+
+    String retval;
+    {
+      /* Setup mocks */
+      
org.powermock.api.mockito.PowerMockito.mockStatic(com.google.common.base.Strings.class);
+      final java.util.ArrayList 
com_google_common_base_Strings_isNullOrEmpty_String_answer_list = new 
java.util.ArrayList();
+      final java.util.ArrayList<Object[]> 
com_google_common_base_Strings_isNullOrEmpty_String_expectation_list = new 
java.util.ArrayList<Object[]>();
+      final com.diffblue.deeptestutils.IterAnswer 
com_google_common_base_Strings_isNullOrEmpty_String_answer_object = new 
com.diffblue.deeptestutils.IterAnswer("com.google.common.base.Strings", 
"isNullOrEmpty", 
com_google_common_base_Strings_isNullOrEmpty_String_answer_list, 
com_google_common_base_Strings_isNullOrEmpty_String_expectation_list);
+      
com_google_common_base_Strings_isNullOrEmpty_String_answer_list.add(false);
+      
org.mockito.Mockito.when(com.google.common.base.Strings.isNullOrEmpty(org.mockito.AdditionalMatchers.or(org.mockito.Matchers.isA(String.class),
 
org.mockito.Matchers.isNull(String.class)))).thenAnswer(com_google_common_base_Strings_isNullOrEmpty_String_answer_object);
+
+      /* Arrange */
+      String str = "\"\"#\"*2\"\"\"b";
+
+      /* Act */
+      Class<?> c = 
Reflector.forName("org.apache.isis.viewer.restfulobjects.server.ResourceContext");
+      Method m = c.getDeclaredMethod("stripQuotes", 
Reflector.forName("java.lang.String"));
+      m.setAccessible(true);
+      retval = (String) m.invoke(null, str);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertEquals("\"\"#\"*2\"\"\"b", retval);
+    }
+  }
+}
diff --git 
a/core/viewer-restfulobjects-server/src/test/java/org/apache/isis/viewer/restfulobjects/server/ResourceContextstripQuotes002Test.java
 
b/core/viewer-restfulobjects-server/src/test/java/org/apache/isis/viewer/restfulobjects/server/ResourceContextstripQuotes002Test.java
new file mode 100644
index 0000000000..ddaa472c30
--- /dev/null
+++ 
b/core/viewer-restfulobjects-server/src/test/java/org/apache/isis/viewer/restfulobjects/server/ResourceContextstripQuotes002Test.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 org.apache.isis.viewer.restfulobjects.server;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+@org.junit.runner.RunWith(org.powermock.modules.junit4.PowerMockRunner.class)
+public class ResourceContextstripQuotes002Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/viewer/restfulobjects/server/ResourceContext.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 202 branch to line 205
+   * conditional line 205 branch to line 208
+   */
+  @org.powermock.core.classloader.annotations.PrepareForTest( { 
com.google.common.base.Strings.class } )
+  @Test
+  public void 
org_apache_isis_viewer_restfulobjects_server_ResourceContext_stripQuotes_002_d57510920a2e3cc3()
 throws Throwable {
+
+    String retval;
+    {
+      /* Setup mocks */
+      
org.powermock.api.mockito.PowerMockito.mockStatic(com.google.common.base.Strings.class);
+      final java.util.ArrayList 
com_google_common_base_Strings_isNullOrEmpty_String_answer_list = new 
java.util.ArrayList();
+      final java.util.ArrayList<Object[]> 
com_google_common_base_Strings_isNullOrEmpty_String_expectation_list = new 
java.util.ArrayList<Object[]>();
+      final com.diffblue.deeptestutils.IterAnswer 
com_google_common_base_Strings_isNullOrEmpty_String_answer_object = new 
com.diffblue.deeptestutils.IterAnswer("com.google.common.base.Strings", 
"isNullOrEmpty", 
com_google_common_base_Strings_isNullOrEmpty_String_answer_list, 
com_google_common_base_Strings_isNullOrEmpty_String_expectation_list);
+      
com_google_common_base_Strings_isNullOrEmpty_String_answer_list.add(false);
+      
org.mockito.Mockito.when(com.google.common.base.Strings.isNullOrEmpty(org.mockito.AdditionalMatchers.or(org.mockito.Matchers.isA(String.class),
 
org.mockito.Matchers.isNull(String.class)))).thenAnswer(com_google_common_base_Strings_isNullOrEmpty_String_answer_object);
+
+      /* Arrange */
+      String str = "#*+\"&2\"\"\"b";
+
+      /* Act */
+      Class<?> c = 
Reflector.forName("org.apache.isis.viewer.restfulobjects.server.ResourceContext");
+      Method m = c.getDeclaredMethod("stripQuotes", 
Reflector.forName("java.lang.String"));
+      m.setAccessible(true);
+      retval = (String) m.invoke(null, str);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertEquals("#*+\"&2\"\"\"b", retval);
+    }
+  }
+}
diff --git 
a/core/viewer-restfulobjects-server/src/test/java/org/apache/isis/viewer/restfulobjects/server/ResourceContextstripQuotes003Test.java
 
b/core/viewer-restfulobjects-server/src/test/java/org/apache/isis/viewer/restfulobjects/server/ResourceContextstripQuotes003Test.java
new file mode 100644
index 0000000000..21514ca53f
--- /dev/null
+++ 
b/core/viewer-restfulobjects-server/src/test/java/org/apache/isis/viewer/restfulobjects/server/ResourceContextstripQuotes003Test.java
@@ -0,0 +1,77 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.server;
+
+import org.junit.Assert;
+import org.junit.rules.ExpectedException;
+import org.junit.Test;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import com.diffblue.deeptestutils.CompareWithFieldList;
+import com.diffblue.deeptestutils.Reflector;
+
+@org.junit.runner.RunWith(org.powermock.modules.junit4.PowerMockRunner.class)
+public class ResourceContextstripQuotes003Test {
+
+  @org.junit.Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  /* testedClasses: 
org/apache/isis/viewer/restfulobjects/server/ResourceContext.java */
+  /*
+   * Test generated by Diffblue Deeptest.
+   * This test case covers:
+   * conditional line 202 branch to line 205
+   * conditional line 205 branch to line 205
+   * conditional line 205 branch to line 206
+   * conditional line 206 branch to line 206
+   */
+  @org.powermock.core.classloader.annotations.PrepareForTest( { 
com.google.common.base.Strings.class } )
+  @Test
+  public void 
org_apache_isis_viewer_restfulobjects_server_ResourceContext_stripQuotes_003_22e2521ea9208f73()
 throws Throwable {
+
+    String retval;
+    {
+      /* Setup mocks */
+      
org.powermock.api.mockito.PowerMockito.mockStatic(com.google.common.base.Strings.class);
+      final java.util.ArrayList 
com_google_common_base_Strings_isNullOrEmpty_String_answer_list = new 
java.util.ArrayList();
+      final java.util.ArrayList<Object[]> 
com_google_common_base_Strings_isNullOrEmpty_String_expectation_list = new 
java.util.ArrayList<Object[]>();
+      final com.diffblue.deeptestutils.IterAnswer 
com_google_common_base_Strings_isNullOrEmpty_String_answer_object = new 
com.diffblue.deeptestutils.IterAnswer("com.google.common.base.Strings", 
"isNullOrEmpty", 
com_google_common_base_Strings_isNullOrEmpty_String_answer_list, 
com_google_common_base_Strings_isNullOrEmpty_String_expectation_list);
+      
com_google_common_base_Strings_isNullOrEmpty_String_answer_list.add(false);
+      
org.mockito.Mockito.when(com.google.common.base.Strings.isNullOrEmpty(org.mockito.AdditionalMatchers.or(org.mockito.Matchers.isA(String.class),
 
org.mockito.Matchers.isNull(String.class)))).thenAnswer(com_google_common_base_Strings_isNullOrEmpty_String_answer_object);
+
+      /* Arrange */
+      String str = "\"c\"#2+\"cb\"";
+
+      /* Act */
+      Class<?> c = 
Reflector.forName("org.apache.isis.viewer.restfulobjects.server.ResourceContext");
+      Method m = c.getDeclaredMethod("stripQuotes", 
Reflector.forName("java.lang.String"));
+      m.setAccessible(true);
+      retval = (String) m.invoke(null, str);
+    }
+    {
+      /* Assert result */
+      Assert.assertNotNull(retval);
+      Assert.assertEquals("c\"#2+\"cb", retval);
+    }
+  }
+}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add tests from Diffblue Deeptest
> --------------------------------
>
>                 Key: ISIS-1967
>                 URL: https://issues.apache.org/jira/browse/ISIS-1967
>             Project: Isis
>          Issue Type: Test
>          Components: Core
>         Environment: Ubuntu 16.04
>            Reporter: Peter
>            Priority: Minor
>              Labels: newbie, test
>
> [Diffblue|https://www.diffblue.com/] is an Oxford, UK-based start-up which 
> develops software to analyse code and automatically generate tests. We have 
> run an analysis against the apache-isis repository on github, which has 
> produced 8891 verified tests. I am proposing to file a PR to add a sample 
> (21) of these tests into the Isis repo.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to