diff --git a/cps-ri/src/test/java/org/onap/cps/DatabaseTestContainer.java b/cps-ri/src/test/java/org/onap/cps/DatabaseTestContainer.java
new file mode 100644
index 0000000..759cc95
--- /dev/null
+++ b/cps-ri/src/test/java/org/onap/cps/DatabaseTestContainer.java
@@ -0,0 +1,64 @@
+/*
+ *  ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Pantheon.tech
+ *  ================================================================================
+ *  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.cps;
+
+import org.testcontainers.containers.PostgreSQLContainer;
+
+/**
+ * The Postgresql database test container wrapper.
+ * Singleton implementation allows saving time on database initialization which
+ * otherwise would occur on each test.
+ */
+public class DatabaseTestContainer extends PostgreSQLContainer<DatabaseTestContainer> {
+    private static final String IMAGE_VERSION = "postgres:11.1";
+    private static DatabaseTestContainer databaseTestContainer;
+
+    private DatabaseTestContainer() {
+        super(IMAGE_VERSION);
+    }
+
+    /**
+     * Provides an instance of test container wrapper.
+     * The returned value expected to be assigned to static variable annotated with @ClassRule.
+     * This will allow to initialize DB connection env variables before DataSource object
+     * is initialized by Spring framework.
+     *
+     */
+    public static DatabaseTestContainer getInstance() {
+        if (databaseTestContainer == null) {
+            databaseTestContainer = new DatabaseTestContainer();
+        }
+        return databaseTestContainer;
+    }
+
+    @Override
+    public void start() {
+        super.start();
+        System.setProperty("DB_URL", databaseTestContainer.getJdbcUrl());
+        System.setProperty("DB_USERNAME", databaseTestContainer.getUsername());
+        System.setProperty("DB_PASSWORD", databaseTestContainer.getPassword());
+    }
+
+    @Override
+    public void stop() {
+        //do nothing, JVM handles shut down
+    }
+
+}
diff --git a/cps-ri/src/test/java/org/onap/cps/TestApplication.java b/cps-ri/src/test/java/org/onap/cps/TestApplication.java
new file mode 100644
index 0000000..5e0e367
--- /dev/null
+++ b/cps-ri/src/test/java/org/onap/cps/TestApplication.java
@@ -0,0 +1,30 @@
+/*
+ *  ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Pantheon.tech
+ *  ================================================================================
+ *  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.cps;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * The @SpringBootApplication annotated class is required in order to run tests
+ * marked with @SpringBootTest annotation.
+ */
+@SpringBootApplication
+public class TestApplication {
+}
diff --git a/cps-ri/src/test/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceTest.java b/cps-ri/src/test/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceTest.java
new file mode 100644
index 0000000..4fc576a
--- /dev/null
+++ b/cps-ri/src/test/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceTest.java
@@ -0,0 +1,141 @@
+/*
+ *  ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Pantheon.tech
+ *  ================================================================================
+ *  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.cps.spi.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import com.google.common.collect.ImmutableSet;
+import java.util.Set;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.cps.DatabaseTestContainer;
+import org.onap.cps.exceptions.CpsValidationException;
+import org.onap.cps.spi.CpsModulePersistenceService;
+import org.onap.cps.spi.entities.Dataspace;
+import org.onap.cps.spi.entities.SchemaSet;
+import org.onap.cps.spi.entities.YangResource;
+import org.onap.cps.spi.repository.DataspaceRepository;
+import org.onap.cps.spi.repository.SchemaSetRepository;
+import org.onap.cps.spi.repository.YangResourceRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.jdbc.Sql;
+import org.springframework.test.context.jdbc.SqlGroup;
+import org.springframework.test.context.junit4.SpringRunner;
+
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class CpsModulePersistenceServiceTest {
+
+    private static final String CLEAR_DATA = "/data/clear-all.sql";
+    private static final String SET_DATA = "/data/schemaset.sql";
+
+    private static final String DATASPACE_NAME = "DATASPACE-001";
+    private static final String DATASPACE_NAME_INVALID = "DATASPACE-X";
+    private static final String SCHEMA_SET_NAME = "SCHEMA-SET-001";
+    private static final String SCHEMA_SET_NAME_NEW = "SCHEMA-SET-NEW";
+    private static final String OLD_RESOURCE_CONTENT = "CONTENT-001";
+    private static final String OLD_RESOURCE_CHECKSUM = "877e65a9f36d54e7702c3f073f6bc42b";
+    private static final String NEW_RESOURCE_CONTENT = "CONTENT-NEW";
+    private static final String NEW_RESOURCE_CHECKSUM = "c94d40a1350eb1c0b1c1949eac84fc59";
+    private static final Long NEW_RESOURCE_ABSTRACT_ID = 0L;
+
+    @ClassRule
+    public static DatabaseTestContainer testContainer = DatabaseTestContainer.getInstance();
+
+    @Autowired
+    private CpsModulePersistenceService cpsModulePersistenceService;
+
+    @Autowired
+    private DataspaceRepository dataspaceRepository;
+
+    @Autowired
+    private YangResourceRepository yangResourceRepository;
+
+    @Autowired
+    private SchemaSetRepository schemaSetRepository;
+
+
+    @Test(expected = CpsValidationException.class)
+    @Sql(CLEAR_DATA)
+    public void testStoreSchemaSetToInvalidDataspace() {
+        cpsModulePersistenceService
+            .storeSchemaSet(DATASPACE_NAME_INVALID, SCHEMA_SET_NAME_NEW, toSet(NEW_RESOURCE_CONTENT));
+    }
+
+    @Test(expected = CpsValidationException.class)
+    @SqlGroup({@Sql(CLEAR_DATA), @Sql(SET_DATA)})
+    public void testStoreDuplicateSchemaSet() {
+        cpsModulePersistenceService.storeSchemaSet(DATASPACE_NAME, SCHEMA_SET_NAME, toSet(NEW_RESOURCE_CONTENT));
+    }
+
+    @Test
+    @SqlGroup({@Sql(CLEAR_DATA), @Sql(SET_DATA)})
+    public void testStoreSchemaSetWithNewYangResource() {
+        cpsModulePersistenceService.storeSchemaSet(DATASPACE_NAME, SCHEMA_SET_NAME_NEW, toSet(NEW_RESOURCE_CONTENT));
+        assertSchemaSetPersisted(DATASPACE_NAME, SCHEMA_SET_NAME_NEW,
+            NEW_RESOURCE_ABSTRACT_ID, NEW_RESOURCE_CONTENT, NEW_RESOURCE_CHECKSUM);
+    }
+
+    @Test
+    @SqlGroup({@Sql(CLEAR_DATA), @Sql(SET_DATA)})
+    public void testStoreSchemaSetWithExistingYangResourceReuse() {
+        cpsModulePersistenceService.storeSchemaSet(DATASPACE_NAME, SCHEMA_SET_NAME_NEW, toSet(OLD_RESOURCE_CONTENT));
+        assertSchemaSetPersisted(DATASPACE_NAME, SCHEMA_SET_NAME_NEW,
+            3001L, OLD_RESOURCE_CONTENT, OLD_RESOURCE_CHECKSUM);
+    }
+
+    private void assertSchemaSetPersisted(final String expectedDataspaceName, final String expectedSchemaSetName,
+                                          final Long expectedYangResourceId, final String expectedYangResourceContent,
+                                          final String expectedYangResourceChecksum) {
+
+        // assert the schema set is persisted
+        final SchemaSet schemaSet = getSchemaSetFromDatabase(expectedDataspaceName, expectedSchemaSetName);
+        assertEquals(expectedDataspaceName, schemaSet.getDataspace().getName());
+        assertEquals(expectedSchemaSetName, schemaSet.getName());
+
+        // assert the attached yang resource is persisted
+        final Set<YangResource> yangResources = schemaSet.getYangResources();
+        assertNotNull(yangResources);
+        assertEquals(1, yangResources.size());
+
+        // assert the attached yang resource content
+        final YangResource yangResource = yangResources.iterator().next();
+        assertNotNull(yangResource.getId());
+        if (expectedYangResourceId != NEW_RESOURCE_ABSTRACT_ID) {
+            // existing resource with known id
+            assertEquals(expectedYangResourceId, yangResource.getId());
+        }
+        assertEquals(expectedYangResourceContent, yangResource.getContent());
+        assertEquals(expectedYangResourceChecksum, yangResource.getChecksum());
+    }
+
+    private static Set<String> toSet(final String... elements) {
+        return ImmutableSet.<String>builder().add(elements).build();
+    }
+
+    private SchemaSet getSchemaSetFromDatabase(final String dataspaceName, final String schemaSetName) {
+        final Dataspace dataspace = dataspaceRepository.findByName(dataspaceName).orElseThrow();
+        return schemaSetRepository.findByDataspaceAndName(dataspace, schemaSetName).orElseThrow();
+    }
+}
diff --git a/cps-ri/src/test/resources/application.yml b/cps-ri/src/test/resources/application.yml
new file mode 100644
index 0000000..f6a5dfb
--- /dev/null
+++ b/cps-ri/src/test/resources/application.yml
@@ -0,0 +1,13 @@
+spring:
+  jpa:
+    ddl-auto: create
+    properties:
+      hibernate:
+        enable_lazy_load_no_trans: true
+        dialect: org.hibernate.dialect.PostgreSQLDialect
+  datasource:
+    url: ${DB_URL}
+    username: ${DB_USERNAME}
+    password: ${DB_PASSWORD}
+    driverClassName: org.postgresql.Driver
+    initialization-mode: always
diff --git a/cps-ri/src/test/resources/data/clear-all.sql b/cps-ri/src/test/resources/data/clear-all.sql
new file mode 100644
index 0000000..3d93825
--- /dev/null
+++ b/cps-ri/src/test/resources/data/clear-all.sql
@@ -0,0 +1,5 @@
+-- clear all via dataspace table cleanup
+-- all other data will be removed by cascade
+DELETE FROM DATASPACE;
+-- explicit clear
+DELETE FROM YANG_RESOURCE;
diff --git a/cps-ri/src/test/resources/data/schemaset.sql b/cps-ri/src/test/resources/data/schemaset.sql
new file mode 100644
index 0000000..23788c3
--- /dev/null
+++ b/cps-ri/src/test/resources/data/schemaset.sql
@@ -0,0 +1,14 @@
+INSERT INTO DATASPACE (ID, NAME) VALUES
+    (1001, 'DATASPACE-001'), (1002, 'DATASPACE-002');
+
+INSERT INTO SCHEMA_SET (ID, NAME, DATASPACE_ID) VALUES
+    (2001, 'SCHEMA-SET-001', 1001), (2002, 'SCHEMA-SET-002', 1001);
+
+INSERT INTO YANG_RESOURCE (ID, CONTENT, CHECKSUM) VALUES
+    (3001, 'CONTENT-001', '877e65a9f36d54e7702c3f073f6bc42b'),
+    (3002, 'CONTENT-002', '88892586b1f23fe8c1595759784a18f8'),
+    (3003, 'CONTENT-003', 'fc5740499a09a48e0c95d6fc45d4bde8'),
+    (3004, 'CONTENT-004', '3801280fe532f5cbf535695cf6122026');
+
+INSERT INTO SCHEMA_SET_YANG_RESOURCES (SCHEMA_SET_ID, YANG_RESOURCE_ID) VALUES
+    (2001, 3001), (2001, 3002), (2002, 3003), (2002, 3004);
