From a66dd4e82e8ef5b2cfe956a9a88a90154889635a Mon Sep 17 00:00:00 2001 From: ToineSiebelink Date: Thu, 10 Dec 2020 14:38:34 +0000 Subject: Fixing Merge Issue Issue-ID: N/A Signed-off-by: ToineSiebelink Change-Id: I03ccd5f2dd260af6ef28524d8a44114c516dfb19 --- .../org/onap/cps/spi/impl/CpsModulePersistenceServiceTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 index 4fc576ab64..a93d277ea1 100644 --- 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 @@ -28,11 +28,12 @@ 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.exceptions.DataspaceNotFoundException; +import org.onap.cps.spi.exceptions.SchemaSetAlreadyDefinedException; import org.onap.cps.spi.repository.DataspaceRepository; import org.onap.cps.spi.repository.SchemaSetRepository; import org.onap.cps.spi.repository.YangResourceRepository; @@ -76,14 +77,14 @@ public class CpsModulePersistenceServiceTest { private SchemaSetRepository schemaSetRepository; - @Test(expected = CpsValidationException.class) + @Test(expected = DataspaceNotFoundException.class) @Sql(CLEAR_DATA) public void testStoreSchemaSetToInvalidDataspace() { cpsModulePersistenceService .storeSchemaSet(DATASPACE_NAME_INVALID, SCHEMA_SET_NAME_NEW, toSet(NEW_RESOURCE_CONTENT)); } - @Test(expected = CpsValidationException.class) + @Test(expected = SchemaSetAlreadyDefinedException.class) @SqlGroup({@Sql(CLEAR_DATA), @Sql(SET_DATA)}) public void testStoreDuplicateSchemaSet() { cpsModulePersistenceService.storeSchemaSet(DATASPACE_NAME, SCHEMA_SET_NAME, toSet(NEW_RESOURCE_CONTENT)); -- cgit 1.2.3-korg