summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-01-18 14:24:10 +0000
committerGerrit Code Review <gerrit@onap.org>2019-01-18 14:24:10 +0000
commit2889cdfc0fd3fcc12a0a716d04861828fec642c5 (patch)
tree9bad85886d87eb18b827e7c027b8c2d913f76803
parent5ff691452cddd202272279183a19617b5ce03508 (diff)
parente199942aed3b521a68a55fae648339512026390c (diff)
Merge "Resource Resolution Service: Primary DB"
-rw-r--r--components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt4
-rw-r--r--components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java6
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt12
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/PrimaryDataResourceAssignmentProcessor.kt130
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt17
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt16
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/application-test.properties27
7 files changed, 195 insertions, 17 deletions
diff --git a/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt b/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt
index e4219c13..0004b02f 100644
--- a/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt
+++ b/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt
@@ -15,6 +15,7 @@
*/
package org.onap.ccsdk.apps.controllerblueprints.resource.dict
+
/**
* ResourceDictionaryConstants
*
@@ -23,7 +24,8 @@ package org.onap.ccsdk.apps.controllerblueprints.resource.dict
object ResourceDictionaryConstants {
const val SOURCE_INPUT = "input"
const val SOURCE_DEFAULT = "default"
- const val SOURCE_DB = "primary-db"
+ const val SOURCE_MDSAL = "mdsal"
+ const val SOURCE_PRIMARY_DB = "primary-db"
const val MODEL_DIR_RESOURCE_DEFINITION: String = "resource_dictionary"
diff --git a/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java b/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
index fa241380..92bfa730 100644
--- a/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
+++ b/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
@@ -59,9 +59,9 @@ public class ResourceDictionaryUtilsTest {
Assert.assertEquals("Expected First source Default, but.", ResourceDictionaryConstants.SOURCE_DEFAULT, resourceAssignment.getDictionarySource());
// To Check Assigned Source
- resourceAssignment.setDictionarySource(ResourceDictionaryConstants.SOURCE_DB);
+ resourceAssignment.setDictionarySource(ResourceDictionaryConstants.SOURCE_PRIMARY_DB);
ResourceDictionaryUtils.populateSourceMapping(resourceAssignment, resourceDefinition);
- Assert.assertEquals("Expected Assigned source DB, but.", ResourceDictionaryConstants.SOURCE_DB, resourceAssignment.getDictionarySource());
+ Assert.assertEquals("Expected Assigned source DB, but.", ResourceDictionaryConstants.SOURCE_PRIMARY_DB, resourceAssignment.getDictionarySource());
}
@@ -78,7 +78,7 @@ public class ResourceDictionaryUtilsTest {
Assert.assertEquals("Expected source Input, but.", ResourceDictionaryConstants.SOURCE_INPUT, inputFirstSource);
// TO check the multiple Source
- sources.put(ResourceDictionaryConstants.SOURCE_DB, new NodeTemplate());
+ sources.put(ResourceDictionaryConstants.SOURCE_PRIMARY_DB, new NodeTemplate());
String multipleFirstSource = ResourceDictionaryUtils.findFirstSource(sources);
Assert.assertEquals("Expected source Input, but.", ResourceDictionaryConstants.SOURCE_INPUT, multipleFirstSource);
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt
index b141025d..9bad0998 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt
@@ -33,8 +33,8 @@ open class DefaultResourceSource : ResourceSourceProperties() {
open class DatabaseResourceSource : ResourceSourceProperties() {
lateinit var type: String
lateinit var query: String
- var inputKeyMapping: MutableList<String>? = null
- var outputKeyMapping: MutableList<String>? = null
+ var inputKeyMapping: MutableMap<String, String>? = null
+ var outputKeyMapping: MutableMap<String, String>? = null
lateinit var keyDependencies: MutableList<String>
}
@@ -43,8 +43,8 @@ open class RestResourceSource : ResourceSourceProperties() {
lateinit var urlPath: String
lateinit var path: String
lateinit var expressionType: String
- var inputKeyMapping: MutableList<String>? = null
- var outputKeyMapping: MutableList<String>? = null
+ var inputKeyMapping: MutableMap<String, String>? = null
+ var outputKeyMapping: MutableMap<String, String>? = null
lateinit var keyDependencies: MutableList<String>
}
@@ -53,7 +53,7 @@ open class CapabilityResourceSource : ResourceSourceProperties() {
lateinit var instanceName: String
lateinit var path: String
lateinit var expressionType: String
- var inputKeyMapping: MutableList<String>? = null
- var outputKeyMapping: MutableList<String>? = null
+ var inputKeyMapping: MutableMap<String, String>? = null
+ var outputKeyMapping: MutableMap<String, String>? = null
lateinit var keyDependencies: MutableList<String>
} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/PrimaryDataResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/PrimaryDataResourceAssignmentProcessor.kt
index ec98d09e..2b3270e6 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/PrimaryDataResourceAssignmentProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/PrimaryDataResourceAssignmentProcessor.kt
@@ -17,8 +17,18 @@
package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor
+import com.fasterxml.jackson.databind.node.JsonNodeFactory
+import com.fasterxml.jackson.databind.node.NullNode
+import org.onap.ccsdk.apps.blueprintsprocessor.db.primary.service.PrimaryDBLibGenericService
+import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.DatabaseResourceSource
+import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
+import org.onap.ccsdk.apps.controllerblueprints.core.*
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDictionaryConstants
+import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
+import java.util.*
/**
* PrimaryDataResourceAssignmentProcessor
@@ -26,15 +36,129 @@ import org.springframework.stereotype.Service
* @author Brinda Santh
*/
@Service("resource-assignment-processor-primary-db")
-open class PrimaryDataResourceAssignmentProcessor : ResourceAssignmentProcessor(){
+open class PrimaryDataResourceAssignmentProcessor(private val primaryDBLibGenericService: PrimaryDBLibGenericService)
+ : ResourceAssignmentProcessor() {
+
+ private val logger = LoggerFactory.getLogger(PrimaryDataResourceAssignmentProcessor::class.java)
override fun getName(): String {
return "resource-assignment-processor-primary-db"
}
- override fun process(executionRequest: ResourceAssignment) {
+ override fun process(resourceAssignment: ResourceAssignment) {
+ try {
+ validate(resourceAssignment)
+
+ // Check if It has Input
+ val value = raRuntimeService.getInputValue(resourceAssignment.name)
+ if (value != null && value !is NullNode) {
+ logger.info("primary-db source template key (${resourceAssignment.name}) found from input and value is ($value)")
+ ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, value)
+ return
+ }
+
+ val dName = resourceAssignment.dictionaryName
+ val dSource = resourceAssignment.dictionarySource
+ val resourceDefinition = resourceDictionaries[dName]
+ ?: throw BluePrintProcessorException("couldn't get resource dictionary definition for $dName")
+ val resourceSource = resourceDefinition.sources[dSource]
+ ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
+ val resourceSourceProperties = checkNotNull(resourceSource.properties) { "failed to get source properties for $dName " }
+ val sourceProperties = JacksonUtils.getInstanceFromMap(resourceSourceProperties, DatabaseResourceSource::class.java)
+ val sql = checkNotNull(sourceProperties.query) { "failed to get request query for $dName under $dSource properties" }
+ val inputKeyMapping = checkNotNull(sourceProperties.inputKeyMapping) { "failed to get input-key-mappings for $dName under $dSource properties" }
+
+ logger.info("$dSource dictionary information : ($sql), ($inputKeyMapping), (${sourceProperties.outputKeyMapping})")
+
+ val rows = primaryDBLibGenericService.query(sql, populateNamedParameter(inputKeyMapping))
+ if (rows.isNullOrEmpty()) {
+ logger.warn("Failed to get $dSource result for dictionary name ($dName) the query ($sql)")
+ } else {
+ processDBResults(resourceAssignment, sourceProperties, rows)
+ }
+
+ // Check the value has populated for mandatory case
+ ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
+ } catch (e: Exception) {
+ ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
+ throw BluePrintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
+ }
+ }
+
+ @Throws(BluePrintProcessorException::class)
+ private fun validate(resourceAssignment: ResourceAssignment) {
+ checkNotEmptyOrThrow(resourceAssignment.name, "resource assignment template key is not defined")
+ checkNotEmptyOrThrow(resourceAssignment.dictionaryName, "resource assignment dictionary name is not defined for template key (${resourceAssignment.name})")
+ checkEqualsOrThrow(ResourceDictionaryConstants.SOURCE_PRIMARY_DB, resourceAssignment.dictionarySource) {
+ "resource assignment source is not ${ResourceDictionaryConstants.SOURCE_PRIMARY_DB} but it is ${resourceAssignment.dictionarySource}"
+ }
+ }
+
+ private fun populateNamedParameter(inputKeyMapping: Map<String, String>): Map<String, Any> {
+ val namedParameters = HashMap<String, Any>()
+ inputKeyMapping.forEach {
+ val expressionValue = raRuntimeService.getDictionaryStore(it.value)
+ logger.trace("Reference dictionary key (${it.key}) resulted in value ($expressionValue)")
+ namedParameters[it.key] = expressionValue
+ }
+ logger.info("Parameter information : ({})", namedParameters)
+ return namedParameters
+ }
+
+ @Throws(BluePrintProcessorException::class)
+ private fun processDBResults(resourceAssignment: ResourceAssignment, sourceProperties: DatabaseResourceSource, rows: List<Map<String, Any>>) {
+ val dName = resourceAssignment.dictionaryName
+ val dSource = resourceAssignment.dictionarySource
+ val type = nullToEmpty(resourceAssignment.property?.type)
+
+ val outputKeyMapping = checkNotNull(sourceProperties.outputKeyMapping) { "failed to get output-key-mappings for $dName under $dSource properties" }
+ logger.info("Response processing type($type)")
+
+ // Primitive Types
+ if (BluePrintTypes.validPrimitiveTypes().contains(type)) {
+ val dbColumnValue = rows[0][outputKeyMapping[dName]]
+ ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, dbColumnValue)
+ }
+ // Array Types
+ else if (BluePrintTypes.validCollectionTypes().contains(type)) {
+ lateinit var entrySchemaType: String
+ if (resourceAssignment.property?.entrySchema != null) {
+ entrySchemaType = nullToEmpty(resourceAssignment.property?.entrySchema?.type)
+ }
+
+ if (checkNotEmptyOrThrow(entrySchemaType, "Entry schema is not defined for dictionary ($dName) info")) {
+ val arrayNode = JsonNodeFactory.instance.arrayNode()
+ rows.forEach {
+ if (BluePrintTypes.validPrimitiveTypes().contains(entrySchemaType)) {
+ val dbColumnValue = it[outputKeyMapping[dName]]
+ // Add Array JSON
+ JacksonUtils.populatePrimitiveValues(dbColumnValue!!, entrySchemaType, arrayNode)
+ } else {
+ val arrayChildNode = JsonNodeFactory.instance.objectNode()
+ for (mapping in outputKeyMapping.entries) {
+ val dbColumnValue = checkNotNull(it[mapping.key])
+ val propertyTypeForDataType = ResourceAssignmentUtils.getPropertyType(raRuntimeService, entrySchemaType, mapping.key)
+ JacksonUtils.populatePrimitiveValues(mapping.key, dbColumnValue, propertyTypeForDataType, arrayChildNode)
+ }
+ arrayNode.add(arrayChildNode)
+ }
+ }
+ // Set the List of Complex Values
+ ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, arrayNode)
+ }
+ } else {
+ // Complex Types
+ val row = rows[0]
+ val objectNode = JsonNodeFactory.instance.objectNode()
+ for (mapping in outputKeyMapping.entries) {
+ val dbColumnValue = checkNotNull(row[mapping.key])
+ val propertyTypeForDataType = ResourceAssignmentUtils.getPropertyType(raRuntimeService, type, mapping.key)
+ JacksonUtils.populatePrimitiveValues(mapping.key, dbColumnValue, propertyTypeForDataType, objectNode)
+ }
+ ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, objectNode)
+ }
}
- override fun recover(runtimeException: RuntimeException, executionRequest: ResourceAssignment) {
+ override fun recover(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
}
} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt
index 8adde863..574d235b 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt
@@ -19,23 +19,36 @@ package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
import com.fasterxml.jackson.databind.JsonNode
import org.junit.Test
import org.junit.runner.RunWith
+import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.apps.blueprintsprocessor.core.BlueprintPropertyConfiguration
import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.apps.blueprintsprocessor.core.utils.PayloadUtils
+import org.onap.ccsdk.apps.blueprintsprocessor.db.BluePrintDBLibConfiguration
+import org.onap.ccsdk.apps.blueprintsprocessor.db.primary.service.PrimaryDBLibGenericService
import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor.*
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode
+import org.onap.ccsdk.apps.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.apps.controllerblueprints.core.putJsonElement
import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration
+import org.springframework.context.annotation.ComponentScan
import org.springframework.test.context.ContextConfiguration
+import org.springframework.test.context.TestPropertySource
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringRunner::class)
-@ContextConfiguration(classes = [ResourceResolutionComponent::class, ResourceResolutionService::class,
+@ContextConfiguration(classes = [ResourceResolutionService::class,
InputResourceAssignmentProcessor::class, DefaultResourceAssignmentProcessor::class,
PrimaryDataResourceAssignmentProcessor::class, SimpleRestResourceAssignmentProcessor::class,
- CapabilityResourceAssignmentProcessor::class])
+ CapabilityResourceAssignmentProcessor::class, PrimaryDBLibGenericService::class,
+ BlueprintPropertyConfiguration::class, BluePrintProperties::class,
+ BluePrintDBLibConfiguration::class, BluePrintLoadConfiguration::class])
+@TestPropertySource(locations = ["classpath:application-test.properties"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor", "org.onap.ccsdk.apps.controllerblueprints"])
+@EnableAutoConfiguration
class ResourceResolutionComponentTest {
@Autowired
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
index 6c686753..9a846d69 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
@@ -19,14 +19,22 @@ package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
+import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.apps.blueprintsprocessor.core.BlueprintPropertyConfiguration
import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.apps.blueprintsprocessor.core.utils.PayloadUtils
+import org.onap.ccsdk.apps.blueprintsprocessor.db.BluePrintDBLibConfiguration
+import org.onap.ccsdk.apps.blueprintsprocessor.db.primary.service.PrimaryDBLibGenericService
import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor.*
+import org.onap.ccsdk.apps.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration
+import org.springframework.context.annotation.ComponentScan
import org.springframework.test.context.ContextConfiguration
+import org.springframework.test.context.TestPropertySource
import org.springframework.test.context.junit4.SpringRunner
import kotlin.test.assertNotNull
import kotlin.test.assertTrue
@@ -40,7 +48,12 @@ import kotlin.test.assertTrue
@ContextConfiguration(classes = [ResourceResolutionService::class,
InputResourceAssignmentProcessor::class, DefaultResourceAssignmentProcessor::class,
PrimaryDataResourceAssignmentProcessor::class, SimpleRestResourceAssignmentProcessor::class,
- CapabilityResourceAssignmentProcessor::class])
+ CapabilityResourceAssignmentProcessor::class, PrimaryDBLibGenericService::class,
+ BlueprintPropertyConfiguration::class, BluePrintProperties::class,
+ BluePrintDBLibConfiguration::class, BluePrintLoadConfiguration::class])
+@TestPropertySource(locations = ["classpath:application-test.properties"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor", "org.onap.ccsdk.apps.controllerblueprints"])
+@EnableAutoConfiguration
class ResourceResolutionServiceTest {
private val log = LoggerFactory.getLogger(ResourceResolutionServiceTest::class.java)
@@ -48,7 +61,6 @@ class ResourceResolutionServiceTest {
@Autowired
lateinit var resourceResolutionService: ResourceResolutionService
-
@Test
fun testRegisteredSource() {
val sources = resourceResolutionService.registeredResourceSources()
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/application-test.properties b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/application-test.properties
new file mode 100644
index 00000000..b7cf00af
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/application-test.properties
@@ -0,0 +1,27 @@
+# suppress inspection "UnusedProperty" for whole file
+#
+# Copyright © 2017-2018 AT&T Intellectual Property.
+#
+# 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.
+#
+blueprintsprocessor.db.primary.url=jdbc:h2:mem:testdb;DB_CLOSE_ON_EXIT=FALSE
+blueprintsprocessor.db.primary.username=sa
+blueprintsprocessor.db.primary.password=
+blueprintsprocessor.db.primary.driverClassName=org.h2.Driver
+blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=create-drop
+blueprintsprocessor.db.primary.hibernateDDLAuto=update
+blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy
+blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.H2Dialect
+# Controller Blueprints Core Configuration
+blueprintsprocessor.blueprintDeployPath=./target/blueprints/deploy
+blueprintsprocessor.blueprintArchivePath=./target/blueprints/archive \ No newline at end of file