Merge branch 'dev' into release_candidate

Change-Id: I35b6eb653631239b327091256b5fea84b339ac03
diff --git a/src/main/java/org/eclipse/mdm/api/odsadapter/ODSEntityManager.java b/src/main/java/org/eclipse/mdm/api/odsadapter/ODSEntityManager.java
index a696c73..6d7c786 100644
--- a/src/main/java/org/eclipse/mdm/api/odsadapter/ODSEntityManager.java
+++ b/src/main/java/org/eclipse/mdm/api/odsadapter/ODSEntityManager.java
@@ -454,7 +454,7 @@
 	 */
 	@Override
 	public Optional<TemplateTest> loadTemplate(Test test) {
-		return Optional.of(ODSEntityFactory.extract(test).getMutableStore().get(TemplateTest.class));
+		return Optional.ofNullable(ODSEntityFactory.extract(test).getMutableStore().get(TemplateTest.class));
 	}
 
 	/**
@@ -462,6 +462,6 @@
 	 */
 	@Override
 	public Optional<TemplateTestStep> loadTemplate(TestStep testStep) {
-		return Optional.of(ODSEntityFactory.extract(testStep).getMutableStore().get(TemplateTestStep.class));
+		return Optional.ofNullable(ODSEntityFactory.extract(testStep).getMutableStore().get(TemplateTestStep.class));
 	}
 }