diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntity.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntity.java
index f5a178a..c0f40f1 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntity.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntity.java
@@ -25,12 +25,17 @@
 import com.google.gson.annotations.SerializedName;
 import io.swagger.annotations.ApiModelProperty;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
+
+import javax.ws.rs.core.Response;
+
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.NonNull;
 
+import org.onap.policy.models.base.PfModelRuntimeException;
 import org.onap.policy.models.base.PfNameVersion;
 
 /**
@@ -71,4 +76,39 @@
             }
         }
     }
+
+    /**
+     * Get a key for this entity.
+     *
+     * @return a ToscaEntityKey for this entry
+     */
+    public ToscaEntityKey getKey() {
+        return new ToscaEntityKey(name, version);
+    }
+
+    /**
+     * Convert a list of maps of TOSCA entities into a regular map.
+     *
+     * @param listOfMapsOfEntities the incoming list of maps of entities
+     * @return The entities on a regular map
+     * @throws PfModelException on duplicate entity entries
+     */
+    public static <T extends ToscaEntity> Map<ToscaEntityKey, T> getEntityListMapAsMap(
+            List<Map<String, T>> listOfMapsOfEntities) {
+        // Declare the return map
+        Map<ToscaEntityKey, T> entityMap = new LinkedHashMap<>();
+
+        for (Map<String, T> mapOfEntities : listOfMapsOfEntities) {
+            for (T entityEntry : mapOfEntities.values()) {
+                if (entityMap.containsKey(entityEntry.getKey())) {
+                    throw new PfModelRuntimeException(Response.Status.INTERNAL_SERVER_ERROR,
+                            "list of map of entities contains more than one entity with key " + entityEntry.getKey());
+                }
+
+                entityMap.put(entityEntry.getKey(), entityEntry);
+            }
+        }
+
+        return entityMap;
+    }
 }
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntityKey.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntityKey.java
new file mode 100644
index 0000000..adde63b
--- /dev/null
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntityKey.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.models.tosca.authorative.concepts;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * This class is a compound key for Tosca entity keying on maps.
+ *
+ * @author Liam Fallon (liam.fallon@est.tech)
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class ToscaEntityKey {
+    private String name;
+    private String version;
+}
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java
index 0b19708..21b15a8 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java
@@ -54,4 +54,12 @@
     @ApiModelProperty(name = "data_types")
     @SerializedName("data_types")
     private List<Map<String, ToscaDataType>> dataTypes;
+
+    public Map<ToscaEntityKey, ToscaPolicyType> getPolicyTypesAsMap() {
+        return ToscaEntity.getEntityListMapAsMap(policyTypes);
+    }
+
+    public Map<ToscaEntityKey, ToscaDataType> getDataTypesAsMap() {
+        return ToscaEntity.getEntityListMapAsMap(dataTypes);
+    }
 }
\ No newline at end of file
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaTopologyTemplate.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaTopologyTemplate.java
index ebb53e1..74ebf07 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaTopologyTemplate.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaTopologyTemplate.java
@@ -37,4 +37,8 @@
     private String description;
 
     private List<Map<String, ToscaPolicy>> policies;
+
+    public Map<ToscaEntityKey, ToscaPolicy> getPoliciesAsMap() {
+        return ToscaEntity.getEntityListMapAsMap(policies);
+    }
 }
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTest.java
index f5be66c..8ee7423 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTest.java
@@ -46,6 +46,8 @@
         policy.setType("my_type");
         policy.setTypeVersion("3.2.1");
 
+        assertEquals("ToscaEntityKey(name=my_name, version=1.2.3)", policy.getKey().toString());
+
         ToscaPolicyIdentifier ident = policy.getIdentifier();
         assertEquals("my_name", ident.getName());
         assertEquals("1.2.3", ident.getVersion());
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java
index a7f3761..10f3b0d 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java
@@ -27,6 +27,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
 
 import org.eclipse.persistence.config.PersistenceUnitProperties;
@@ -382,7 +383,7 @@
         ToscaServiceTemplate gotServiceTemplate =
                 new AuthorativeToscaProvider().getPolicies(pfDao, policyKey.getName(), policyKey.getVersion());
 
-        assertEquals(0, gotServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).size());
+        assertTrue(gotServiceTemplate.getToscaTopologyTemplate().getPolicies().isEmpty());
     }
 
     @Test
@@ -408,6 +409,49 @@
         }).hasMessage("An incoming list of concepts must have at least one entry");
     }
 
+    @Test
+    public void testEntityMaps() throws CoderException, PfModelException {
+        Object yamlObject = new Yaml().load(
+                ResourceUtils.getResourceAsString("policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.yaml"));
+        String yamlAsJsonString = new StandardCoder().encode(yamlObject);
+
+        ToscaServiceTemplate toscaServiceTemplatePolicyType =
+                standardCoder.decode(yamlAsJsonString, ToscaServiceTemplate.class);
+
+        assertNotNull(toscaServiceTemplatePolicyType);
+        new AuthorativeToscaProvider().createPolicyTypes(pfDao, toscaServiceTemplatePolicyType);
+
+        assertEquals(3, toscaServiceTemplatePolicyType.getDataTypesAsMap().size());
+        assertEquals(2, toscaServiceTemplatePolicyType.getPolicyTypesAsMap().size());
+
+        ToscaServiceTemplate toscaServiceTemplate = standardCoder.decode(
+                ResourceUtils.getResourceAsString("policies/vCPE.policy.monitoring.input.tosca.json"),
+                ToscaServiceTemplate.class);
+
+        assertNotNull(toscaServiceTemplate);
+        ToscaServiceTemplate createdServiceTemplate =
+                new AuthorativeToscaProvider().createPolicies(pfDao, toscaServiceTemplate);
+
+        PfConceptKey policyKey = new PfConceptKey("onap.restart.tca:1.0.0");
+
+        ToscaPolicy beforePolicy =
+                toscaServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
+        ToscaPolicy createdPolicy =
+                createdServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
+        assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, createdPolicy));
+        assertTrue(beforePolicy.getType().equals(createdPolicy.getType()));
+
+        assertEquals(1, toscaServiceTemplate.getToscaTopologyTemplate().getPoliciesAsMap().size());
+        assertEquals(1, createdServiceTemplate.getToscaTopologyTemplate().getPoliciesAsMap().size());
+
+        Map<String, ToscaPolicy> policyMapItem = createdServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0);
+        createdServiceTemplate.getToscaTopologyTemplate().getPolicies().add(policyMapItem);
+
+        assertThatThrownBy(() -> {
+            createdServiceTemplate.getToscaTopologyTemplate().getPoliciesAsMap();
+        }).hasMessageContaining("list of map of entities contains more than one entity with key");
+    }
+
     private void createPolicyTypes() throws CoderException, PfModelException {
         Object yamlObject = new Yaml().load(
                 ResourceUtils.getResourceAsString("policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.yaml"));
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java
index 6a925bc..ded2cde 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java
@@ -23,6 +23,7 @@
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import com.google.gson.GsonBuilder;
 
@@ -133,7 +134,7 @@
         PfConceptKey policyTypeKey = new PfConceptKey("onap.policies.optimization.AffinityPolicy:0.0.0");
 
         ToscaPolicyType beforePolicyType = toscaServiceTemplate.getPolicyTypes().get(1).get(policyTypeKey.getName());
-        ToscaPolicyType createdPolicyType = createdServiceTemplate.getPolicyTypes().get(0).get(policyTypeKey.getName());
+        ToscaPolicyType createdPolicyType = createdServiceTemplate.getPolicyTypes().get(1).get(policyTypeKey.getName());
         assertEquals(true, beforePolicyType.getName().equals(createdPolicyType.getName()));
         assertEquals(0, ObjectUtils.compare(beforePolicyType.getDescription(), createdPolicyType.getDescription()));
 
@@ -199,7 +200,7 @@
         PfConceptKey policyTypeKey = new PfConceptKey("onap.policies.optimization.AffinityPolicy:0.0.0");
 
         ToscaPolicyType beforePolicyType = toscaServiceTemplate.getPolicyTypes().get(1).get(policyTypeKey.getName());
-        ToscaPolicyType createdPolicyType = createdServiceTemplate.getPolicyTypes().get(0).get(policyTypeKey.getName());
+        ToscaPolicyType createdPolicyType = createdServiceTemplate.getPolicyTypes().get(1).get(policyTypeKey.getName());
         assertEquals(true, beforePolicyType.getName().equals(createdPolicyType.getName()));
         assertEquals(0, ObjectUtils.compare(beforePolicyType.getDescription(), createdPolicyType.getDescription()));
 
@@ -283,7 +284,7 @@
         PfConceptKey policyTypeKey = new PfConceptKey("onap.policies.optimization.AffinityPolicy:0.0.0");
 
         ToscaPolicyType beforePolicyType = toscaServiceTemplate.getPolicyTypes().get(1).get(policyTypeKey.getName());
-        ToscaPolicyType createdPolicyType = createdServiceTemplate.getPolicyTypes().get(0).get(policyTypeKey.getName());
+        ToscaPolicyType createdPolicyType = createdServiceTemplate.getPolicyTypes().get(1).get(policyTypeKey.getName());
         assertEquals(true, beforePolicyType.getName().equals(createdPolicyType.getName()));
         assertEquals(0, ObjectUtils.compare(beforePolicyType.getDescription(), createdPolicyType.getDescription()));
     }
@@ -315,14 +316,14 @@
         PfConceptKey policyTypeKey = new PfConceptKey("onap.policies.optimization.AffinityPolicy:0.0.0");
 
         ToscaPolicyType beforePolicyType = toscaServiceTemplate.getPolicyTypes().get(1).get(policyTypeKey.getName());
-        ToscaPolicyType createdPolicyType = createdServiceTemplate.getPolicyTypes().get(0).get(policyTypeKey.getName());
+        ToscaPolicyType createdPolicyType = createdServiceTemplate.getPolicyTypes().get(1).get(policyTypeKey.getName());
         assertEquals(true, beforePolicyType.getName().equals(createdPolicyType.getName()));
         assertEquals(0, ObjectUtils.compare(beforePolicyType.getDescription(), createdPolicyType.getDescription()));
 
         ToscaServiceTemplate updatedServiceTemplate =
                 new AuthorativeToscaProvider().updatePolicyTypes(pfDao, toscaServiceTemplate);
 
-        ToscaPolicyType updatedPolicy = updatedServiceTemplate.getPolicyTypes().get(0).get(policyTypeKey.getName());
+        ToscaPolicyType updatedPolicy = updatedServiceTemplate.getPolicyTypes().get(1).get(policyTypeKey.getName());
         assertEquals(true, beforePolicyType.getName().equals(updatedPolicy.getName()));
         assertEquals(0, ObjectUtils.compare(beforePolicyType.getDescription(), updatedPolicy.getDescription()));
     }
@@ -366,7 +367,7 @@
         PfConceptKey policyTypeKey = new PfConceptKey("onap.policies.optimization.AffinityPolicy:0.0.0");
 
         ToscaPolicyType beforePolicyType = toscaServiceTemplate.getPolicyTypes().get(1).get(policyTypeKey.getName());
-        ToscaPolicyType createdPolicyType = createdServiceTemplate.getPolicyTypes().get(0).get(policyTypeKey.getName());
+        ToscaPolicyType createdPolicyType = createdServiceTemplate.getPolicyTypes().get(1).get(policyTypeKey.getName());
         assertEquals(true, beforePolicyType.getName().equals(createdPolicyType.getName()));
         assertEquals(0, ObjectUtils.compare(beforePolicyType.getDescription(), createdPolicyType.getDescription()));
 
@@ -380,7 +381,7 @@
         ToscaServiceTemplate gotServiceTemplate = new AuthorativeToscaProvider().getPolicyTypes(pfDao,
                 policyTypeKey.getName(), policyTypeKey.getVersion());
 
-        assertEquals(0, gotServiceTemplate.getPolicyTypes().get(0).size());
+        assertTrue(gotServiceTemplate.getPolicyTypes().isEmpty());
     }
 
     @Test
diff --git a/models-tosca/src/test/resources/logback-test.xml b/models-tosca/src/test/resources/logback-test.xml
index 6e2737d..a7a5838 100644
--- a/models-tosca/src/test/resources/logback-test.xml
+++ b/models-tosca/src/test/resources/logback-test.xml
@@ -25,7 +25,7 @@
     <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
     <property name="LOG_DIR" value="${java.io.tmpdir}/pf_logging/" />
 
-    <!-- USE FOR STD OUT ONLY -->
+    <!-- USE FOR STD OUTPUT ONLY -->
     <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
         <encoder>
             <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern>
