diff --git a/components/core/pom.xml b/components/core/pom.xml
index 8b6c524..631ee00 100644
--- a/components/core/pom.xml
+++ b/components/core/pom.xml
@@ -52,11 +52,17 @@
             <groupId>org.yaml</groupId>
             <artifactId>snakeyaml</artifactId>
         </dependency>
+        <!--Testing dependencies-->
         <dependency>
             <groupId>org.jetbrains.kotlin</groupId>
             <artifactId>kotlin-test-junit</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>io.mockk</groupId>
+            <artifactId>mockk</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
 </project>
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt
index 9767b2e..663c1fe 100644
--- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt
+++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt
@@ -502,7 +502,7 @@
 A Node Template specifies the occurrence of a manageable software component as part of an application’s topology model which is defined in a TOSCA Service Template.  A Node template is an instance of a specified Node Type and can provide customized properties, constraints or operations which override the defaults provided by its Node Type and its implementations.
  */
 
-class NodeTemplate {
+open class NodeTemplate {
     @get:JsonIgnore
     var id: String? = null
     var description: String? = null
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt
index bc1f4b4..1a6d096 100644
--- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt
+++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt
@@ -148,7 +148,7 @@
     val nodeTemplates: MutableMap<String, NodeTemplate>? = serviceTemplate.topologyTemplate?.nodeTemplates
 
     fun nodeTemplateByName(name: String): NodeTemplate =
-            nodeTemplates?.get(name) ?: throw BluePrintException("could't get node template for the name($name) ")
+            nodeTemplates?.get(name) ?: throw BluePrintException("could't get node template for the name($name)")
 
     fun nodeTemplateForNodeType(name: String): MutableMap<String, NodeTemplate>? {
         return nodeTemplates?.filterValues { nodeTemplate -> nodeTemplate.type == name }?.toMutableMap()
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
index 0187445..58a8207 100644
--- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
+++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.onap.ccsdk.apps.controllerblueprints.core.utils
 
 import com.att.eelf.configuration.EELFLogger
@@ -22,6 +21,9 @@
 import com.fasterxml.jackson.annotation.JsonInclude
 import com.fasterxml.jackson.core.type.TypeReference
 import com.fasterxml.jackson.databind.JsonNode
+import com.fasterxml.jackson.databind.node.ArrayNode
+import com.fasterxml.jackson.databind.node.NullNode
+import com.fasterxml.jackson.databind.node.ObjectNode
 import com.fasterxml.jackson.databind.SerializationFeature
 import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
 import kotlinx.coroutines.Dispatchers
@@ -40,241 +42,209 @@
  *
  * @author Brinda Santh
  */
-object JacksonUtils {
-    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
+class JacksonUtils {
+    companion object {
+        private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
+        inline fun <reified T : Any> readValue(content: String): T =
+                jacksonObjectMapper().readValue(content, T::class.java)
 
-    inline fun <reified T : Any> readValue(content: String): T =
-            jacksonObjectMapper().readValue(content, T::class.java)
+        fun <T> readValue(content: String, valueType: Class<T>): T? {
+            return jacksonObjectMapper().readValue(content, valueType)
+        }
 
-    @JvmStatic
-    fun <T> readValue(content: String, valueType: Class<T>): T? {
-        return jacksonObjectMapper().readValue(content, valueType)
-    }
+        fun <T> readValue(node: JsonNode, valueType: Class<T>): T? {
+            return jacksonObjectMapper().treeToValue(node, valueType)
+        }
 
-    @JvmStatic
-    fun <T> readValue(node: JsonNode, valueType: Class<T>): T? {
-        return jacksonObjectMapper().treeToValue(node, valueType)
-    }
+        fun getContent(fileName: String): String = runBlocking {
+            async {
+                try {
+                    File(fileName).readText(Charsets.UTF_8)
+                } catch (e: Exception) {
+                    throw BluePrintException("couldn't get file ($fileName) content : ${e.message}")
+                }
+            }.await()
+        }
 
-    @JvmStatic
-    fun getContent(fileName: String): String = runBlocking {
-        async {
-            try {
-                File(fileName).readText(Charsets.UTF_8)
-            } catch (e: Exception) {
-                throw BluePrintException("couldn't get file ($fileName) content : ${e.message}")
-            }
-        }.await()
-    }
-
-    @JvmStatic
-    fun getClassPathFileContent(fileName: String): String {
-        return runBlocking {
-            withContext(Dispatchers.Default) {
-                IOUtils.toString(JacksonUtils::class.java.classLoader
-                        .getResourceAsStream(fileName), Charset.defaultCharset())
+        fun getClassPathFileContent(fileName: String): String {
+            return runBlocking {
+                withContext(Dispatchers.Default) {
+                    IOUtils.toString(JacksonUtils::class.java.classLoader
+                            .getResourceAsStream(fileName), Charset.defaultCharset())
+                }
             }
         }
-    }
 
-    @JvmStatic
-    fun <T> readValueFromFile(fileName: String, valueType: Class<T>): T? {
-        val content: String = getContent(fileName)
-        return readValue(content, valueType)
-    }
-
-    @JvmStatic
-    fun <T> readValueFromClassPathFile(fileName: String, valueType: Class<T>): T? {
-        val content: String = getClassPathFileContent(fileName)
-        return readValue(content, valueType)
-    }
-
-    @JvmStatic
-    fun jsonNodeFromObject(from: kotlin.Any): JsonNode = jacksonObjectMapper().convertValue(from, JsonNode::class.java)
-
-    @JvmStatic
-    fun jsonNodeFromClassPathFile(fileName: String): JsonNode {
-        val content: String = getClassPathFileContent(fileName)
-        return jsonNode(content)
-    }
-
-    @JvmStatic
-    fun jsonNodeFromFile(fileName: String): JsonNode {
-        val content: String = getContent(fileName)
-        return jsonNode(content)
-    }
-
-    @JvmStatic
-    fun jsonNode(content: String): JsonNode {
-        return jacksonObjectMapper().readTree(content)
-    }
-
-    @JvmStatic
-    fun getJson(any: kotlin.Any): String {
-        return getJson(any, false)
-    }
-
-    @JvmStatic
-    fun getWrappedJson(wrapper: String, any: kotlin.Any, pretty: Boolean = false): String {
-        val wrapperMap = hashMapOf<String, Any>()
-        wrapperMap[wrapper] = any
-        return getJson(wrapperMap, pretty)
-    }
-
-    @JvmStatic
-    fun getJson(any: kotlin.Any, pretty: Boolean = false): String {
-        val objectMapper = jacksonObjectMapper()
-        objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL)
-        if (pretty) {
-            objectMapper.enable(SerializationFeature.INDENT_OUTPUT)
-        }
-        return objectMapper.writeValueAsString(any)
-    }
-
-    @JvmStatic
-    fun <T> getListFromJsonNode(node: JsonNode, valueType: Class<T>): List<T>? {
-        return getListFromJson(node.toString(), valueType)
-    }
-
-    @JvmStatic
-    fun <T> getListFromJson(content: String, valueType: Class<T>): List<T>? {
-        val objectMapper = jacksonObjectMapper()
-        val javaType = objectMapper.typeFactory.constructCollectionType(List::class.java, valueType)
-        return objectMapper.readValue<List<T>>(content, javaType)
-    }
-
-    @JvmStatic
-    fun <T> getListFromFile(fileName: String, valueType: Class<T>): List<T>? {
-        val content: String = getContent(fileName)
-        return getListFromJson(content, valueType)
-    }
-
-    @JvmStatic
-    fun <T> getListFromClassPathFile(fileName: String, valueType: Class<T>): List<T>? {
-        val content: String = getClassPathFileContent(fileName)
-        return getListFromJson(content, valueType)
-    }
-
-    @JvmStatic
-    fun <T> getMapFromJson(content: String, valueType: Class<T>): MutableMap<String, T>? {
-        val objectMapper = jacksonObjectMapper()
-        val typeRef = object : TypeReference<MutableMap<String, T>>() {}
-        return objectMapper.readValue(content, typeRef)
-    }
-
-    @JvmStatic
-    fun <T> getMapFromFile(fileName: String, valueType: Class<T>): MutableMap<String, T>? {
-        val content: String = getContent(fileName)
-        return getMapFromJson(content, valueType)
-    }
-
-    @JvmStatic
-    fun checkJsonNodeValueOfType(type: String, jsonNode: JsonNode): Boolean {
-        if (BluePrintTypes.validPrimitiveTypes().contains(type)) {
-            return checkJsonNodeValueOfPrimitiveType(type, jsonNode)
-        } else if (BluePrintTypes.validCollectionTypes().contains(type)) {
-            return checkJsonNodeValueOfCollectionType(type, jsonNode)
-        }
-        return false
-    }
-
-    @JvmStatic
-    fun checkJsonNodeValueOfPrimitiveType(primitiveType: String, jsonNode: JsonNode): Boolean {
-        when (primitiveType) {
-            BluePrintConstants.DATA_TYPE_STRING -> return jsonNode.isTextual
-            BluePrintConstants.DATA_TYPE_BOOLEAN -> return jsonNode.isBoolean
-            BluePrintConstants.DATA_TYPE_INTEGER -> return jsonNode.isInt
-            BluePrintConstants.DATA_TYPE_FLOAT -> return jsonNode.isDouble
-            BluePrintConstants.DATA_TYPE_TIMESTAMP -> return jsonNode.isTextual
-            else -> return false
-        }
-    }
-
-    @JvmStatic
-    fun checkJsonNodeValueOfCollectionType(type: String, jsonNode: JsonNode): Boolean {
-        when (type) {
-            BluePrintConstants.DATA_TYPE_LIST -> return jsonNode.isArray
-            BluePrintConstants.DATA_TYPE_MAP -> return jsonNode.isContainerNode
-            else -> return false
+        fun <T> readValueFromFile(fileName: String, valueType: Class<T>): T? {
+            val content: String = getContent(fileName)
+            return readValue(content, valueType)
         }
 
-    }
-/*
-    @JvmStatic
-    fun populatePrimitiveValues(key: String, value: Any, primitiveType: String, objectNode: ObjectNode) {
-        if (BluePrintConstants.DATA_TYPE_BOOLEAN == primitiveType) {
-            objectNode.put(key, value as Boolean)
-        } else if (BluePrintConstants.DATA_TYPE_INTEGER == primitiveType) {
-            objectNode.put(key, value as Int)
-        } else if (BluePrintConstants.DATA_TYPE_FLOAT == primitiveType) {
-            objectNode.put(key, value as Float)
-        } else if (BluePrintConstants.DATA_TYPE_TIMESTAMP == primitiveType) {
-            objectNode.put(key, value as String)
-        } else {
-            objectNode.put(key, value as String)
+        fun <T> readValueFromClassPathFile(fileName: String, valueType: Class<T>): T? {
+            val content: String = getClassPathFileContent(fileName)
+            return readValue(content, valueType)
         }
-    }
 
-    @JvmStatic
-    fun populatePrimitiveValues(value: Any, primitiveType: String, objectNode: ArrayNode) {
-        if (BluePrintConstants.DATA_TYPE_BOOLEAN == primitiveType) {
-            objectNode.add(value as Boolean)
-        } else if (BluePrintConstants.DATA_TYPE_INTEGER == primitiveType) {
-            objectNode.add(value as Int)
-        } else if (BluePrintConstants.DATA_TYPE_FLOAT == primitiveType) {
-            objectNode.add(value as Float)
-        } else if (BluePrintConstants.DATA_TYPE_TIMESTAMP == primitiveType) {
-            objectNode.add(value as String)
-        } else {
-            objectNode.add(value as String)
+        fun jsonNodeFromObject(from: kotlin.Any): JsonNode {
+            return jacksonObjectMapper().convertValue(from, JsonNode::class.java)
         }
-    }
 
-    @JvmStatic
-    fun populatePrimitiveDefaultValues(key: String, primitiveType: String, objectNode: ObjectNode) {
-        if (BluePrintConstants.DATA_TYPE_BOOLEAN == primitiveType) {
-            objectNode.put(key, false)
-        } else if (BluePrintConstants.DATA_TYPE_INTEGER == primitiveType) {
-            objectNode.put(key, 0)
-        } else if (BluePrintConstants.DATA_TYPE_FLOAT == primitiveType) {
-            objectNode.put(key, 0.0)
-        } else {
-            objectNode.put(key, "")
+        fun jsonNodeFromClassPathFile(fileName: String): JsonNode {
+            val content: String = getClassPathFileContent(fileName)
+            return jsonNode(content)
         }
-    }
 
-    @JvmStatic
-    fun populatePrimitiveDefaultValuesForArrayNode(primitiveType: String, arrayNode: ArrayNode) {
-        if (BluePrintConstants.DATA_TYPE_BOOLEAN == primitiveType) {
-            arrayNode.add(false)
-        } else if (BluePrintConstants.DATA_TYPE_INTEGER == primitiveType) {
-            arrayNode.add(0)
-        } else if (BluePrintConstants.DATA_TYPE_FLOAT == primitiveType) {
-            arrayNode.add(0.0)
-        } else {
-            arrayNode.add("")
+        fun jsonNodeFromFile(fileName: String): JsonNode {
+            val content: String = getContent(fileName)
+            return jsonNode(content)
         }
-    }
 
-    @JvmStatic
-    fun populateJsonNodeValues(key: String, nodeValue: JsonNode?, type: String, objectNode: ObjectNode) {
-        if (nodeValue == null || nodeValue is NullNode) {
-            objectNode.set(key, nodeValue)
-        } else if (BluePrintTypes.validPrimitiveTypes().contains(type)) {
-            if (BluePrintConstants.DATA_TYPE_BOOLEAN == type) {
-                objectNode.put(key, nodeValue.asBoolean())
-            } else if (BluePrintConstants.DATA_TYPE_INTEGER == type) {
-                objectNode.put(key, nodeValue.asInt())
-            } else if (BluePrintConstants.DATA_TYPE_FLOAT == type) {
-                objectNode.put(key, nodeValue.floatValue())
-            } else if (BluePrintConstants.DATA_TYPE_TIMESTAMP == type) {
-                objectNode.put(key, nodeValue.asText())
+        fun jsonNode(content: String): JsonNode {
+            return jacksonObjectMapper().readTree(content)
+        }
+
+        fun getJson(any: kotlin.Any): String {
+            return getJson(any, false)
+        }
+
+        fun getWrappedJson(wrapper: String, any: kotlin.Any, pretty: Boolean = false): String {
+            val wrapperMap = hashMapOf<String, Any>()
+            wrapperMap[wrapper] = any
+            return getJson(wrapperMap, pretty)
+        }
+
+        fun getJson(any: kotlin.Any, pretty: Boolean = false): String {
+            val objectMapper = jacksonObjectMapper()
+            objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL)
+            if (pretty) {
+                objectMapper.enable(SerializationFeature.INDENT_OUTPUT)
+            }
+            return objectMapper.writeValueAsString(any)
+        }
+
+        fun getJsonNode(any: kotlin.Any?, pretty: Boolean = false): JsonNode {
+            val objectMapper = jacksonObjectMapper()
+            objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL)
+            if (pretty) {
+                objectMapper.enable(SerializationFeature.INDENT_OUTPUT)
+            }
+            return objectMapper.valueToTree(any)
+        }
+
+        fun <T> getListFromJsonNode(node: JsonNode, valueType: Class<T>): List<T>? {
+            return getListFromJson(node.toString(), valueType)
+        }
+
+        fun <T> getListFromJson(content: String, valueType: Class<T>): List<T>? {
+            val objectMapper = jacksonObjectMapper()
+            val javaType = objectMapper.typeFactory.constructCollectionType(List::class.java, valueType)
+            return objectMapper.readValue<List<T>>(content, javaType)
+        }
+
+        fun <T> getListFromFile(fileName: String, valueType: Class<T>): List<T>? {
+            val content: String = getContent(fileName)
+            return getListFromJson(content, valueType)
+        }
+
+        fun <T> getListFromClassPathFile(fileName: String, valueType: Class<T>): List<T>? {
+            val content: String = getClassPathFileContent(fileName)
+            return getListFromJson(content, valueType)
+        }
+
+        fun <T> getMapFromJson(content: String, valueType: Class<T>): MutableMap<String, T>? {
+            val objectMapper = jacksonObjectMapper()
+            val typeRef = object : TypeReference<MutableMap<String, T>>() {}
+            return objectMapper.readValue(content, typeRef)
+        }
+
+        fun <T> getMapFromFile(fileName: String, valueType: Class<T>): MutableMap<String, T>? {
+            val content: String = getContent(fileName)
+            return getMapFromJson(content, valueType)
+        }
+
+        fun checkJsonNodeValueOfType(type: String, jsonNode: JsonNode): Boolean {
+            if (BluePrintTypes.validPrimitiveTypes().contains(type)) {
+                return checkJsonNodeValueOfPrimitiveType(type, jsonNode)
+            } else if (BluePrintTypes.validCollectionTypes().contains(type)) {
+                return checkJsonNodeValueOfCollectionType(type, jsonNode)
+            }
+            return false
+        }
+
+        fun checkJsonNodeValueOfPrimitiveType(primitiveType: String, jsonNode: JsonNode): Boolean {
+            when (primitiveType) {
+                BluePrintConstants.DATA_TYPE_STRING -> return jsonNode.isTextual
+                BluePrintConstants.DATA_TYPE_BOOLEAN -> return jsonNode.isBoolean
+                BluePrintConstants.DATA_TYPE_INTEGER -> return jsonNode.isInt
+                BluePrintConstants.DATA_TYPE_FLOAT -> return jsonNode.isDouble
+                BluePrintConstants.DATA_TYPE_TIMESTAMP -> return jsonNode.isTextual
+                else -> return false
+            }
+        }
+
+        fun checkJsonNodeValueOfCollectionType(type: String, jsonNode: JsonNode): Boolean {
+            when (type) {
+                BluePrintConstants.DATA_TYPE_LIST -> return jsonNode.isArray
+                BluePrintConstants.DATA_TYPE_MAP -> return jsonNode.isContainerNode
+                else -> return false
+            }
+        }
+
+        fun populatePrimitiveValues(key: String, value: Any, primitiveType: String, objectNode: ObjectNode) {
+            when (primitiveType) {
+                BluePrintConstants.DATA_TYPE_BOOLEAN -> objectNode.put(key, value as Boolean)
+                BluePrintConstants.DATA_TYPE_INTEGER -> objectNode.put(key, value as Int)
+                BluePrintConstants.DATA_TYPE_FLOAT -> objectNode.put(key, value as Float)
+                BluePrintConstants.DATA_TYPE_TIMESTAMP -> objectNode.put(key, value as String)
+                else -> objectNode.put(key, value as String)
+            }
+        }
+
+        fun populatePrimitiveValues(value: Any, primitiveType: String, arrayNode: ArrayNode) {
+            when (primitiveType) {
+                BluePrintConstants.DATA_TYPE_BOOLEAN -> arrayNode.add(value as Boolean)
+                BluePrintConstants.DATA_TYPE_INTEGER -> arrayNode.add(value as Int)
+                BluePrintConstants.DATA_TYPE_FLOAT -> arrayNode.add(value as Float)
+                BluePrintConstants.DATA_TYPE_TIMESTAMP -> arrayNode.add(value as String)
+                else -> arrayNode.add(value as String)
+            }
+        }
+
+        fun populatePrimitiveDefaultValues(key: String, primitiveType: String, objectNode: ObjectNode) {
+            when (primitiveType) {
+                BluePrintConstants.DATA_TYPE_BOOLEAN -> objectNode.put(key, false)
+                BluePrintConstants.DATA_TYPE_INTEGER -> objectNode.put(key, 0)
+                BluePrintConstants.DATA_TYPE_FLOAT -> objectNode.put(key, 0.0)
+                else -> objectNode.put(key, "")
+            }
+        }
+
+        fun populatePrimitiveDefaultValuesForArrayNode(primitiveType: String, arrayNode: ArrayNode) {
+            when (primitiveType) {
+                BluePrintConstants.DATA_TYPE_BOOLEAN -> arrayNode.add(false)
+                BluePrintConstants.DATA_TYPE_INTEGER -> arrayNode.add(0)
+                BluePrintConstants.DATA_TYPE_FLOAT -> arrayNode.add(0.0)
+                else -> arrayNode.add("")
+            }
+        }
+
+        fun populateJsonNodeValues(key: String, nodeValue: JsonNode?, type: String, objectNode: ObjectNode) {
+            if (nodeValue == null || nodeValue is NullNode) {
+                objectNode.set(key, nodeValue)
+            } else if (BluePrintTypes.validPrimitiveTypes().contains(type)) {
+                populatePrimitiveValues(key, nodeValue, type, objectNode)
             } else {
-                objectNode.put(key, nodeValue.asText())
+                objectNode.set(key, nodeValue)
             }
-        } else {
-            objectNode.set(key, nodeValue)
+        }
+
+        fun convertPrimitiveResourceValue(type: String, value: String): JsonNode? {
+            when (type) {
+                BluePrintConstants.DATA_TYPE_BOOLEAN -> return JacksonUtils.getJsonNode(value as Boolean)
+                BluePrintConstants.DATA_TYPE_INTEGER -> return JacksonUtils.getJsonNode(value as Int)
+                BluePrintConstants.DATA_TYPE_FLOAT -> return JacksonUtils.getJsonNode(value as Float)
+                else -> return JacksonUtils.getJsonNode(value)
+            }
         }
     }
-    */
 }
\ No newline at end of file
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/validation/BluePrintWorkflowValidatorImpl.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/validation/BluePrintWorkflowValidatorImpl.kt
index 1a138c3..f55449e 100644
--- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/validation/BluePrintWorkflowValidatorImpl.kt
+++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/validation/BluePrintWorkflowValidatorImpl.kt
@@ -19,7 +19,10 @@
 import com.att.eelf.configuration.EELFLogger
 import com.att.eelf.configuration.EELFManager
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate
 import org.onap.ccsdk.apps.controllerblueprints.core.data.Workflow
+import org.onap.ccsdk.apps.controllerblueprints.core.format
 import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
 import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintWorkflowValidator
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
@@ -42,14 +45,35 @@
 
         // Step Validation Start
         paths.add("steps")
-        workflow.steps?.forEach { stepName, _ ->
+        workflow.steps?.forEach { stepName, step ->
             paths.add(stepName)
             paths.joinToString(BluePrintConstants.PATH_DIVIDER)
-            // TODO("Step Validation")
+
+            // Validate target
+            step.target?.let {
+                try {
+                    val nodeTemplate = bluePrintRuntimeService.bluePrintContext().nodeTemplateByName(it)
+
+                    val nodeTypeDerivedFrom = bluePrintRuntimeService.bluePrintContext().nodeTemplateNodeType(it).derivedFrom
+
+                    check(nodeTypeDerivedFrom == BluePrintConstants.MODEL_TYPE_NODE_DG) {
+                        "NodeType(${nodeTemplate.type}) derived from is '$nodeTypeDerivedFrom', Expected is " +
+                                "'${BluePrintConstants.MODEL_TYPE_NODE_DG}'"
+                    }
+                } catch (e: Exception) {
+                    bluePrintRuntimeService.getBluePrintError()
+                            .addError("Failed to validate Workflow($workflowName)'s step($stepName)'s " +
+                                    "definition", paths.joinToString(BluePrintConstants.PATH_DIVIDER), e.message!!)
+                }
+            }
             paths.removeAt(paths.lastIndex)
         }
         paths.removeAt(paths.lastIndex)
         // Step Validation Ends
         paths.removeAt(paths.lastIndex)
+
+        workflow.inputs?.let {
+            bluePrintTypeValidatorService.validatePropertyDefinitions(bluePrintRuntimeService, workflow.inputs!!)
+        }
     }
 }
\ No newline at end of file
diff --git a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
index 1dfb89a..c01b14b 100644
--- a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
+++ b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
@@ -26,8 +26,7 @@
 import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintRuntimeUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils.jsonNodeFromFile
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils.jsonNodeFromObject
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
 import kotlin.test.assertEquals
 import kotlin.test.assertNotNull
 
@@ -47,7 +46,7 @@
 
         val inputDataPath = "src/test/resources/data/default-context.json"
 
-        val inputNode: JsonNode = jsonNodeFromFile(inputDataPath)
+        val inputNode: JsonNode = JacksonUtils.jsonNodeFromFile(inputDataPath)
         bluePrintRuntimeService.assignInputs(inputNode)
 
         val propContext: MutableMap<String, JsonNode> = bluePrintRuntimeService.resolveNodeTemplateProperties("activate-process")
@@ -82,9 +81,9 @@
                 "ResourceAssignmentComponent", "process")
 
         assertNotNull(inContext, "Failed to populate interface input property values")
-        assertEquals(inContext["action-name"], jsonNodeFromObject("sample-action"), "Failed to populate parameter action-name")
-        assertEquals(inContext["request-id"], jsonNodeFromObject("12345"), "Failed to populate parameter action-name")
-    }
+        assertEquals(inContext["action-name"], JacksonUtils.jsonNodeFromObject("sample-action"), "Failed to populate parameter action-name")
+        assertEquals(inContext["request-id"], JacksonUtils.jsonNodeFromObject("12345"), "Failed to populate parameter action-name")
+      }
 
     @Test
     fun testResolveNodeTemplateInterfaceOperationOutputs() {
@@ -113,9 +112,9 @@
         val bluePrintRuntimeService = getBluePrintRuntimeService()
 
         bluePrintRuntimeService.setNodeTemplateAttributeValue("resource-assignment-ra-component", "context1",
-                jsonNodeFromObject("context1-value"))
+                JacksonUtils.jsonNodeFromObject("context1-value"))
         bluePrintRuntimeService.setNodeTemplateAttributeValue("resource-assignment-ra-component", "context2",
-                jsonNodeFromObject("context2-value"))
+                JacksonUtils.jsonNodeFromObject("context2-value"))
 
         val keys = listOf("context1", "context2")
 
diff --git a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/validation/BluePrintValidatorServiceImplTest.kt b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/validation/BluePrintValidatorServiceImplTest.kt
index c98f2ac..344b0cc 100644
--- a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/validation/BluePrintValidatorServiceImplTest.kt
+++ b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/validation/BluePrintValidatorServiceImplTest.kt
@@ -16,28 +16,86 @@
 
 package org.onap.ccsdk.apps.controllerblueprints.core.validation
 
+import io.mockk.every
+import io.mockk.mockk
+import org.junit.Ignore
 import org.junit.Test
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintError
+import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate
+import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeType
+import org.onap.ccsdk.apps.controllerblueprints.core.data.Step
+import org.onap.ccsdk.apps.controllerblueprints.core.data.Workflow
 import org.onap.ccsdk.apps.controllerblueprints.core.mock.MockBluePrintTypeValidatorService
+import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.apps.controllerblueprints.core.service.DefaultBluePrintRuntimeService
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
+import kotlin.test.assertEquals
 import kotlin.test.assertTrue
 
 class BluePrintValidatorServiceImplTest {
 
-    val blueprintBasePath: String = ("./../model-catalog/blueprint-model/starter-blueprint/baseconfiguration")
-
+    private val blueprintBasePath: String = ("./../model-catalog/blueprint-model/starter-blueprint/baseconfiguration")
+    private val bluePrintRuntime = BluePrintMetadataUtils.getBluePrintRuntime("1234", blueprintBasePath)
+    private val mockBluePrintTypeValidatorService = MockBluePrintTypeValidatorService()
+    private val defaultBluePrintValidatorService = BluePrintValidatorServiceImpl(mockBluePrintTypeValidatorService)
+    private val workflowValidator = BluePrintWorkflowValidatorImpl(mockBluePrintTypeValidatorService)
 
     @Test
     fun testValidateOfType() {
-        val bluePrintRuntime = BluePrintMetadataUtils.getBluePrintRuntime("1234", blueprintBasePath)
-
-        val mockBluePrintTypeValidatorService = MockBluePrintTypeValidatorService()
-
-        val defaultBluePrintValidatorService = BluePrintValidatorServiceImpl(mockBluePrintTypeValidatorService)
-
         val valid = defaultBluePrintValidatorService.validateBluePrints(bluePrintRuntime)
-
         assertTrue(valid, "failed in blueprint Validation")
-
     }
+
+    @Test
+    fun testValidateWorkflowFailToFoundNodeTemplate() {
+        val workflowName = "resource-assignment"
+
+        val step = Step()
+        step.target = "TestCaseFailNoNodeTemplate"
+        val workflow = Workflow()
+        workflow.steps = mutableMapOf("test" to step)
+        workflowValidator.validate(bluePrintRuntime, workflowName, workflow)
+
+        assertEquals(1, bluePrintRuntime.getBluePrintError().errors.size)
+        assertEquals("Failed to validate Workflow(resource-assignment)'s step(test)'s definition : resource-assignment/steps/test : could't get node template for the name(TestCaseFailNoNodeTemplate)", bluePrintRuntime.getBluePrintError().errors[0])
+    }
+
+    @Test
+    fun testValidateWorkflowFailNodeTemplateNotDgGeneric() {
+        val workflowName = "resource-assignment"
+        val nodeTemplateName = "resource-assignment-process"
+
+        val nodeTemplate = mockk<NodeTemplate>()
+        every { nodeTemplate.type } returns "TestNodeType"
+
+        val nodeType = mockk<NodeType>()
+        every { nodeType.derivedFrom } returns "tosca.nodes.TEST"
+
+        val blueprintContext = mockk<BluePrintContext>()
+        every { blueprintContext.nodeTemplateByName(nodeTemplateName) } returns nodeTemplate
+        every { blueprintContext.nodeTemplateNodeType(nodeTemplateName) } returns nodeType
+
+        val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("1234")
+
+        every { bluePrintRuntime.getBluePrintError() } returns BluePrintError()
+        every { bluePrintRuntime.bluePrintContext() } returns blueprintContext
+
+        val step = Step()
+        step.target = nodeTemplateName
+        val workflow = Workflow()
+        workflow.steps = mutableMapOf("test" to step)
+        workflowValidator.validate(bluePrintRuntime, workflowName, workflow)
+
+        assertEquals(1, bluePrintRuntime.getBluePrintError().errors.size)
+        assertEquals("Failed to validate Workflow(resource-assignment)'s step(test)'s definition : resource-assignment/steps/test : NodeType(TestNodeType) derived from is 'tosca.nodes.TEST', Expected is 'tosca.nodes.DG'", bluePrintRuntime.getBluePrintError().errors[0])
+    }
+
+    @Test
+    fun testValidateWorkflowSuccess() {
+        val workflowName = "resource-assignment"
+        workflowValidator.validate(bluePrintRuntime, workflowName, bluePrintRuntime.bluePrintContext().workflowByName(workflowName))
+    }
+
 }
 
diff --git a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/data_types.json b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/data_types.json
index 7d850f2..6d771cd 100644
--- a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/data_types.json
+++ b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/data_types.json
@@ -28,6 +28,14 @@
           "required": true,
           "type": "string"
         },
+        "service-instance-id": {
+          "required": true,
+          "type": "string"
+        },
+        "vnf-id": {
+          "required": true,
+          "type": "string"
+        },
         "action-name": {
           "required": true,
           "type": "string"
@@ -39,6 +47,10 @@
         "hostname": {
           "required": true,
           "type": "string"
+        },
+        "vnf_name": {
+          "required": true,
+          "type": "string"
         }
       },
       "derived_from": "tosca.datatypes.Dynamic"
diff --git a/components/parent/pom.xml b/components/parent/pom.xml
index 1c49aed..71e2bec 100644
--- a/components/parent/pom.xml
+++ b/components/parent/pom.xml
@@ -16,7 +16,8 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.onap.ccsdk.apps</groupId>
@@ -40,7 +41,7 @@
         <springfox.swagger2.version>2.9.2</springfox.swagger2.version>
         <h2database.version>1.4.197</h2database.version>
         <onap.logger.slf4j>1.2.2</onap.logger.slf4j>
-        <powermock.version>1.7.4</powermock.version>
+        <mockk.version>1.9</mockk.version>
     </properties>
     <dependencyManagement>
         <dependencies>
@@ -189,9 +190,9 @@
 
             <!-- Testing Dependencies -->
             <dependency>
-                <groupId>org.powermock</groupId>
-                <artifactId>powermock-api-mockito2</artifactId>
-                <version>${powermock.version}</version>
+                <groupId>io.mockk</groupId>
+                <artifactId>mockk</artifactId>
+                <version>${mockk.version}</version>
                 <scope>test</scope>
             </dependency>
             <dependency>
diff --git a/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinitionTest.java b/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinitionTest.java
index fde8000..cb39200 100644
--- a/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinitionTest.java
+++ b/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinitionTest.java
@@ -31,7 +31,7 @@
     public void testDictionaryDefinitionInputSource(){
 
         String fileName = basePath + "/input-source.json";
-        ResourceDefinition resourceDefinition = JacksonUtils.readValueFromFile(fileName, ResourceDefinition.class);
+        ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class);
         Assert.assertNotNull("Failed to populate dictionaryDefinition for input type", resourceDefinition);
     }
 
@@ -39,7 +39,7 @@
     public void testDictionaryDefinitionDefaultSource(){
 
         String fileName = basePath + "/default-source.json";
-        ResourceDefinition resourceDefinition = JacksonUtils.readValueFromFile(fileName, ResourceDefinition.class);
+        ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class);
         Assert.assertNotNull("Failed to populate dictionaryDefinition for default type", resourceDefinition);
     }
 
@@ -47,14 +47,14 @@
     public void testDictionaryDefinitionDBSource(){
 
         String fileName = basePath + "/db-source.json";
-        ResourceDefinition resourceDefinition = JacksonUtils.readValueFromFile(fileName, ResourceDefinition.class);
+        ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class);
         Assert.assertNotNull("Failed to populate dictionaryDefinition for db type", resourceDefinition);
     }
 
     @Test
     public void testDictionaryDefinitionMDSALSource(){
         String fileName = basePath + "/mdsal-source.json";
-        ResourceDefinition resourceDefinition = JacksonUtils.readValueFromFile(fileName, ResourceDefinition.class);
+        ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class);
         Assert.assertNotNull("Failed to populate dictionaryDefinition for mdsal type", resourceDefinition);
     }
 }
diff --git a/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceDefinitionValidationServiceTest.java b/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceDefinitionValidationServiceTest.java
index 2b68585..f5c3567 100644
--- a/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceDefinitionValidationServiceTest.java
+++ b/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceDefinitionValidationServiceTest.java
@@ -45,7 +45,7 @@
 
     private void testValidate(String fileName) throws Exception {
 
-        ResourceDefinition resourceDefinition = JacksonUtils.readValueFromFile(fileName, ResourceDefinition.class);
+        ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class);
         Assert.assertNotNull("Failed to populate dictionaryDefinition for  type", resourceDefinition);
 
         ResourceDefinitionValidationService resourceDictionaryValidationService =
diff --git a/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java b/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java
index c7444db..a2c2310 100644
--- a/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java
+++ b/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java
@@ -30,7 +30,7 @@
 
     @Test
     public void testProcess(){
-        List<ResourceAssignment> assignments = JacksonUtils.getListFromClassPathFile("validation/success.json", ResourceAssignment.class);
+        List<ResourceAssignment> assignments = JacksonUtils.Companion.getListFromClassPathFile("validation/success.json", ResourceAssignment.class);
         Assert.assertNotNull("failed to get ResourceAssignment from validation/success.json ", assignments);
         BulkResourceSequencingUtils.process(assignments);
     }
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 13bf819..fa24138 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
@@ -86,7 +86,7 @@
 
     @Test
     public void testAssignInputs() {
-        JsonNode data = JacksonUtils.jsonNodeFromClassPathFile("data/resource-assignment-input.json");
+        JsonNode data = JacksonUtils.Companion.jsonNodeFromClassPathFile("data/resource-assignment-input.json");
         Map<String, Object> context = new HashMap<>();
         ResourceDictionaryUtils.assignInputs(data, context);
         String path = BluePrintConstants.PATH_INPUTS.concat(BluePrintConstants.PATH_DIVIDER).concat("mapValue");
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/utils/PythonExecutorUtils.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/utils/PythonExecutorUtils.kt
index 66c919d..341ede5 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/utils/PythonExecutorUtils.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/utils/PythonExecutorUtils.kt
@@ -20,6 +20,7 @@
 import org.python.core.PyObject
 import org.python.util.PythonInterpreter
 import org.slf4j.LoggerFactory
+import java.io.File
 import java.util.*
 
 class PythonExecutorUtils {
@@ -61,9 +62,9 @@
             sb.append(System.getProperty("java.class.path"))
 
             for (p in pythonPath) {
-                sb.append(":").append(p)
+                sb.append(File.pathSeparator).append(p)
             }
-            log.debug("Paths : $sb")
+            log.debug("Python Paths : $sb")
 
             props["python.import.site"] = "true"
             props.setProperty("python.path", sb.toString())
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/utils/PythonExecutorUtilsTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/utils/PythonExecutorUtilsTest.kt
index 431c6b8..c4fd546 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/utils/PythonExecutorUtilsTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/utils/PythonExecutorUtilsTest.kt
@@ -30,7 +30,7 @@
     @Test
     fun testGetPythonComponent() {
 
-        val pythonPath: MutableList<String> = arrayListOf()
+        val pythonPath: MutableList<String> = mutableListOf()
         pythonPath.add("./../../../../components/scripts/python/ccsdk_blueprints")
 
         val properties: MutableMap<String, Any> = hashMapOf()
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/resources/requests/sample-activate-request.json b/ms/blueprintsprocessor/functions/python-executor/src/test/resources/requests/sample-activate-request.json
new file mode 100644
index 0000000..7142f04
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/resources/requests/sample-activate-request.json
@@ -0,0 +1,31 @@
+{
+  "actionIdentifiers": {
+    "actionName": "activate",
+    "blueprintName": "baseconfiguration",
+    "blueprintVersion": "1.0.0",
+    "mode": "sync"
+  },
+  "commonHeader": {
+    "flags": {
+      "force": true,
+      "ttl": 3600
+    },
+    "originatorId": "sdnc",
+    "requestId": "123456-1000",
+    "subRequestId": "sub-123456-1000",
+    "timestamp": "2012-04-23T18:25:43.511Z"
+  },
+  "payload": {
+    "resource-assignment-request": {
+      "resource-assignment-properties": {
+        "request-id": "1234",
+        "service-instance-id": "siid_1234",
+        "vnf-id": "vnf_1234",
+        "action-name": "assign-activate",
+        "scope-type": "vnf-type",
+        "hostname": "localhost",
+        "vnf_name": "temp_vnf"
+      }
+    }
+  }
+}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt
new file mode 100644
index 0000000..9d6f4a6
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt
@@ -0,0 +1,58 @@
+package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
+
+import com.fasterxml.jackson.databind.JsonNode
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.apps.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+
+class ResourceAssignmentRuntimeService(private var id: String, private var bluePrintContext: BluePrintContext)
+    : DefaultBluePrintRuntimeService(id, bluePrintContext){
+
+    private var resourceResolutionStore: MutableMap<String, JsonNode> = hashMapOf()
+
+    override fun getExecutionContext(): MutableMap<String, JsonNode> {
+        return resourceResolutionStore
+    }
+
+    @Suppress("UNCHECKED_CAST")
+    override fun setExecutionContext(executionContext: MutableMap<String, JsonNode>) {
+        this.resourceResolutionStore = executionContext
+    }
+
+    override fun put(key: String, value: JsonNode) {
+        resourceResolutionStore[key] = value
+    }
+
+    override fun get(key: String): JsonNode {
+        return resourceResolutionStore[key] ?: throw BluePrintProcessorException("failed to get execution property($key)")
+    }
+
+    override fun check(key: String): Boolean {
+        return resourceResolutionStore.containsKey(key)
+    }
+
+    override fun cleanRuntime() {
+        resourceResolutionStore.clear()
+    }
+
+    private fun getJsonNode(key: String): JsonNode {
+        return get(key)
+    }
+
+    override fun getAsString(key: String): String? {
+        return get(key).asText()
+    }
+
+    override fun getAsBoolean(key: String): Boolean? {
+        return get(key).asBoolean()
+    }
+
+    override fun getAsInt(key: String): Int? {
+        return get(key).asInt()
+    }
+
+    override fun getAsDouble(key: String): Double? {
+        return get(key).asDouble()
+    }
+
+}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/InputResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/InputResourceAssignmentProcessor.kt
index 9d47600..ccf3aee 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/InputResourceAssignmentProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/InputResourceAssignmentProcessor.kt
@@ -17,8 +17,11 @@
 
 package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor
 
+import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils.ResourceResolutionUtils
+import org.onap.ccsdk.apps.controllerblueprints.core.*
 import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
 import org.springframework.stereotype.Service
+import com.fasterxml.jackson.databind.node.NullNode
 
 /**
  * InputResourceAssignmentProcessor
@@ -33,6 +36,20 @@
     }
 
     override fun process(executionRequest: ResourceAssignment) {
+        try {
+            if (checkNotEmpty(executionRequest.name)) {
+                val value = bluePrintRuntimeService!!.getInputValue(executionRequest.name)
+                // if value is null don't call setResourceDataValue to populate the value
+                if (value != null && value !is NullNode) {
+                    ResourceResolutionUtils.setResourceDataValue(executionRequest, value)
+                }
+            }
+            // Check the value has populated for mandatory case
+            ResourceResolutionUtils.assertTemplateKeyValueNotNull(executionRequest)
+        } catch (e: Exception) {
+            ResourceResolutionUtils.setFailedResourceDataValue(executionRequest, e.message)
+            throw BluePrintProcessorException("Failed in template key ($executionRequest) assignments with : (${e.message})", e)
+        }
     }
 
     override fun recover(runtimeException: RuntimeException, executionRequest: ResourceAssignment) {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/utils/ResourceResolutionUtils.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/utils/ResourceResolutionUtils.kt
index 6bcd21b..7c59088 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/utils/ResourceResolutionUtils.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/utils/ResourceResolutionUtils.kt
@@ -16,17 +16,142 @@
 
 package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils
 
+import java.util.Date
+import org.apache.commons.lang3.StringUtils
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
 import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
+import com.fasterxml.jackson.databind.ObjectMapper
+import com.fasterxml.jackson.databind.node.NullNode
+import com.fasterxml.jackson.databind.node.ObjectNode
+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
 
 class ResourceResolutionUtils {
     companion object {
 
+        private val logger: EELFLogger = EELFManager.getInstance().getLogger(ResourceResolutionUtils::class.toString())
+
+        @Synchronized
+        @Throws(BluePrintProcessorException::class)
+        fun setResourceDataValue(resourceAssignment: ResourceAssignment, value: Any?) {
+
+            val resourceProp = checkNotNull(resourceAssignment.property) { "Failed in setting resource value for resource mapping $resourceAssignment" }
+            checkNotEmptyNThrow(resourceAssignment.name, "Failed in setting resource value for resource mapping $resourceAssignment")
+
+            if (checkNotEmpty(resourceAssignment.dictionaryName)) {
+                resourceAssignment.dictionaryName = resourceAssignment.name
+                logger.warn("Missing dictionary key, setting with template key (${resourceAssignment.name}) as dictionary key (${resourceAssignment.dictionaryName})")
+            }
+
+            try {
+                if (checkNotEmpty(resourceProp.type)) {
+                    val convertedValue = convertResourceValue(resourceProp.type, value)
+                    logger.info("Setting Resource Value ($convertedValue) for Resource Name (${resourceAssignment.dictionaryName}) of type (${resourceProp.type})")
+                    resourceProp.value = convertedValue
+                    resourceAssignment.updatedDate = Date()
+                    resourceAssignment.updatedBy = BluePrintConstants.USER_SYSTEM
+                    resourceAssignment.status = BluePrintConstants.STATUS_SUCCESS
+                }
+            } catch (e: Exception) {
+                throw BluePrintProcessorException("Failed in setting value for template key (%s) and " +
+                        "dictionary key (${resourceAssignment.name}) of type (${resourceProp.type}) with error message (${e.message})", e)
+            }
+        }
+
+        private fun convertResourceValue(type: String, value: Any?): JsonNode? {
+            var convertedValue: JsonNode?
+
+            if (value == null || value is NullNode) {
+                logger.info("Returning {} value from convertResourceValue", value)
+                return null
+            } else if (BluePrintTypes.validPrimitiveTypes().contains(type) && value is String) {
+                convertedValue = JacksonUtils.convertPrimitiveResourceValue(type, value)
+            } else {
+                // Case where Resource is non-primitive type
+                if (value is String) {
+                    convertedValue = JacksonUtils.jsonNode(value)
+                } else {
+                    convertedValue = JacksonUtils.getJsonNode(value)
+                }
+            }
+            return convertedValue
+        }
+
+        @Synchronized
+        fun setFailedResourceDataValue(resourceAssignment: ResourceAssignment, message: String?) {
+            if (checkNotEmpty(resourceAssignment.name)) {
+                resourceAssignment.updatedDate = Date()
+                resourceAssignment.updatedBy = BluePrintConstants.USER_SYSTEM
+                resourceAssignment.status = BluePrintConstants.STATUS_FAILURE
+                resourceAssignment.message = message
+            }
+        }
+
+        @Synchronized
+        @Throws(BluePrintProcessorException::class)
+        fun assertTemplateKeyValueNotNull(resourceAssignment: ResourceAssignment) {
+            val resourceProp = checkNotNull(resourceAssignment.property) { "Failed to populate mandatory resource resource mapping $resourceAssignment" }
+            if (resourceProp.required != null && resourceProp.required!! && (resourceProp.value == null || resourceProp.value !is NullNode)) {
+                logger.error("failed to populate mandatory resource mapping ($resourceAssignment)")
+                throw BluePrintProcessorException("failed to populate mandatory resource mapping ($resourceAssignment)")
+            }
+        }
+
+        @Synchronized
+        @Throws(BluePrintProcessorException::class)
+        fun generateResourceDataForAssignments(assignments: List<ResourceAssignment>): String {
+            var result = "{}"
+            try {
+                val mapper = ObjectMapper()
+                val root = mapper.readTree(result)
+
+                assignments.forEach {
+                    if (checkNotEmpty(it.name) && it.property != null) {
+
+                        val type = it.property?.type
+                        val value = it.property?.value
+                        logger.info("Generating Resource name ({}), type ({}), value ({})", it.name, type,
+                                value)
+                        if (value == null) {
+                            (root as ObjectNode).set(it.name, null)
+                        } else if (value is JsonNode) {
+                            (root as ObjectNode).put(it.name, value as JsonNode)
+                        } else if (BluePrintConstants.DATA_TYPE_STRING.equals(type, ignoreCase = true)) {
+                            (root as ObjectNode).put(it.name, value as String)
+                        } else if (BluePrintConstants.DATA_TYPE_BOOLEAN.equals(type, ignoreCase = true)) {
+                            (root as ObjectNode).put(it.name, value as Boolean)
+                        } else if (BluePrintConstants.DATA_TYPE_INTEGER.equals(type, ignoreCase = true)) {
+                            (root as ObjectNode).put(it.name, value as Int)
+                        } else if (BluePrintConstants.DATA_TYPE_FLOAT.equals(type, ignoreCase = true)) {
+                            (root as ObjectNode).put(it.name, value as Float)
+                        } else if (BluePrintConstants.DATA_TYPE_TIMESTAMP.equals(type, ignoreCase = true)) {
+                            (root as ObjectNode).put(it.name, value as String)
+                        } else {
+                            val jsonNode = JacksonUtils.getJsonNode(value)
+                            if (jsonNode != null) {
+                                (root as ObjectNode).put(it.name, jsonNode)
+                            } else {
+                                (root as ObjectNode).set(it.name, null)
+                            }
+                        }
+                    }
+                }
+                result = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(root)
+                logger.info("Generated Resource Param Data ({})", result)
+            } catch (e: Exception) {
+                throw BluePrintProcessorException("kapil is failing with $e.message", e)
+            }
+
+            return result
+        }
+
         fun <T> transformResourceSource(properties: MutableMap<String, JsonNode>, classType: Class<T>): T {
             val content = JacksonUtils.getJson(properties)
             return JacksonUtils.readValue(content, classType)
                     ?: throw BluePrintProcessorException("failed to transform content($content) to type($classType)")
         }
+
     }
 }
\ 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/ResourceResolutionServiceTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
index 7f41ba1..46ccb97 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,8 +19,11 @@
 import org.junit.Assert
 import org.junit.Test
 import org.junit.runner.RunWith
+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.functions.resource.resolution.processor.*
 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.test.context.ContextConfiguration
@@ -62,6 +65,12 @@
         val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime("1234",
                 "./../../../../components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration")
 
+        val executionServiceInput = JacksonUtils.readValueFromClassPathFile("payload/requests/sample-resourceresolution-request.json",
+                ExecutionServiceInput::class.java)!!
+
+        // Prepare Inputs
+        PayloadUtils.prepareInputsFromWorkflowPayload(bluePrintRuntimeService, executionServiceInput.payload, "resource-assignment")
+
         resourceResolutionService.resolveResources(bluePrintRuntimeService, "resource-assignment", "baseconfig")
 
     }
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/requests/sample-resourceresolution-request.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/requests/sample-resourceresolution-request.json
index 7889a7e..c4fe4ea 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/requests/sample-resourceresolution-request.json
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/requests/sample-resourceresolution-request.json
@@ -19,9 +19,12 @@
     "resource-assignment-request": {
       "resource-assignment-properties": {
         "request-id": "1234",
+        "service-instance-id": "siid_1234",
+        "vnf-id": "vnf_1234",
         "action-name": "assign-activate",
         "scope-type": "vnf-type",
-        "hostname": "localhost"
+        "hostname": "localhost",
+        "vnf_name": "temp_vnf"
       }
     }
   }
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/SchemaGeneratorService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/SchemaGeneratorService.java
index 89af9e9..3a1535a 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/SchemaGeneratorService.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/SchemaGeneratorService.java
@@ -59,7 +59,7 @@
      */
     public String generateSchema(String serviceTemplateContent) throws BluePrintException {
         if (StringUtils.isNotBlank(serviceTemplateContent)) {
-            ServiceTemplate serviceTemplate = JacksonUtils.readValue(serviceTemplateContent,
+            ServiceTemplate serviceTemplate = JacksonUtils.Companion.readValue(serviceTemplateContent,
                     ServiceTemplate.class);
             return generateSchema(serviceTemplate);
         } else {
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/JpaJsonNodeConverter.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/JpaJsonNodeConverter.java
index 23d3a97..074483a 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/JpaJsonNodeConverter.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/JpaJsonNodeConverter.java
@@ -30,11 +30,11 @@
 
     @Override
     public String convertToDatabaseColumn(JsonNode node) {
-        return JacksonUtils.getJson(node, true);
+        return JacksonUtils.Companion.getJson(node, true);
     }
 
     @Override
     public JsonNode convertToEntityAttribute(String dbData) {
-        return JacksonUtils.jsonNode(dbData);
+        return JacksonUtils.Companion.jsonNode(dbData);
     }
 }
\ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/JpaResourceDefinitionConverter.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/JpaResourceDefinitionConverter.java
index 18672f1..e28cdcd 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/JpaResourceDefinitionConverter.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/JpaResourceDefinitionConverter.java
@@ -29,11 +29,11 @@
         AttributeConverter<ResourceDefinition, String> {
     @Override
     public String convertToDatabaseColumn(ResourceDefinition resourceDefinition) {
-        return JacksonUtils.getJson(resourceDefinition);
+        return JacksonUtils.Companion.getJson(resourceDefinition);
     }
 
     @Override
     public ResourceDefinition convertToEntityAttribute(String content) {
-        return JacksonUtils.readValue(content, ResourceDefinition.class);
+        return JacksonUtils.Companion.readValue(content, ResourceDefinition.class);
     }
 }
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidator.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidator.java
index 6d02544..5d15e08 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidator.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidator.java
@@ -58,7 +58,7 @@
     public boolean validateServiceTemplate(String serviceTemplateContent) throws BluePrintException {
         if (StringUtils.isNotBlank(serviceTemplateContent)) {
             ServiceTemplate serviceTemplate =
-                    JacksonUtils.readValue(serviceTemplateContent, ServiceTemplate.class);
+                    JacksonUtils.Companion.readValue(serviceTemplateContent, ServiceTemplate.class);
             return validateServiceTemplate(serviceTemplate);
         } else {
             throw new BluePrintException(
@@ -131,11 +131,11 @@
                 Object mappingObject =
                         capabilityAssignment.getProperties().get(ConfigModelConstant.CAPABILITY_PROPERTY_MAPPING);
                 if (mappingObject != null) {
-                    String mappingContent = JacksonUtils.getJson(mappingObject);
+                    String mappingContent = JacksonUtils.Companion.getJson(mappingObject);
                     Preconditions.checkArgument(StringUtils.isNotBlank(mappingContent),
                             String.format("Failed to get capability mapping property (%s) ", ConfigModelConstant.CAPABILITY_PROPERTY_MAPPING));
 
-                    resourceAssignment = JacksonUtils.getListFromJson(mappingContent, ResourceAssignment.class);
+                    resourceAssignment = JacksonUtils.Companion.getListFromJson(mappingContent, ResourceAssignment.class);
 
                     Preconditions.checkNotNull(resourceAssignment,
                             String.format("Failed to get resource assignment info from the content (%s) ", mappingContent));
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/ModelTypeServiceTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/ModelTypeServiceTest.java
index 412e960..42c6365 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/ModelTypeServiceTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/ModelTypeServiceTest.java
@@ -56,12 +56,12 @@
     public void test01SaveModelType() throws Exception {
         log.info("**************** test01SaveModelType  ********************");
 
-        String content = JacksonUtils.getClassPathFileContent("model_type/data_type/datatype-property.json");
+        String content = JacksonUtils.Companion.getClassPathFileContent("model_type/data_type/datatype-property.json");
         ModelType modelType = new ModelType();
         modelType.setDefinitionType(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE);
         modelType.setDerivedFrom(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT);
         modelType.setDescription("Definition for Sample Datatype ");
-        modelType.setDefinition(JacksonUtils.jsonNode(content));
+        modelType.setDefinition(JacksonUtils.Companion.jsonNode(content));
         modelType.setModelName(modelName);
         modelType.setVersion("1.0.0");
         modelType.setTags("test-datatype ," + BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT + ","
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ModelTypeReactRepositoryTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ModelTypeReactRepositoryTest.java
index 7549b78..739ce51 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ModelTypeReactRepositoryTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ModelTypeReactRepositoryTest.java
@@ -54,12 +54,12 @@
     @Test
     @Commit
     public void test01Save() {
-        String content = JacksonUtils.getClassPathFileContent("model_type/data_type/datatype-property.json");
+        String content = JacksonUtils.Companion.getClassPathFileContent("model_type/data_type/datatype-property.json");
         ModelType modelType = new ModelType();
         modelType.setDefinitionType(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE);
         modelType.setDerivedFrom(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT);
         modelType.setDescription("Definition for Sample Datatype ");
-        modelType.setDefinition(JacksonUtils.jsonNode(content));
+        modelType.setDefinition(JacksonUtils.Companion.jsonNode(content));
         modelType.setModelName(modelName);
         modelType.setVersion("1.0.0");
         modelType.setTags("test-datatype ," + BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT + ","
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java
index 2a63683..fb11c39 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java
@@ -55,7 +55,7 @@
     @Test
     @Commit
     public void test01Save() {
-        ResourceDefinition resourceDefinition = JacksonUtils.readValueFromFile("./../../../../components/model-catalog/resource-dictionary/starter-dictionary/sample-db-source.json", ResourceDefinition.class);
+        ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile("./../../../../components/model-catalog/resource-dictionary/starter-dictionary/sample-db-source.json", ResourceDefinition.class);
         Assert.assertNotNull("Failed to get resourceDefinition from content", resourceDefinition);
         resourceDefinition.setName(sourceName);
 
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java
index bf5db34..64c87e0 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java
@@ -53,12 +53,12 @@
     public void test01SaveModelType() throws Exception {
         log.info("**************** test01SaveModelType  ********************");
 
-        String content = JacksonUtils.getClassPathFileContent("model_type/data_type/datatype-property.json");
+        String content = JacksonUtils.Companion.getClassPathFileContent("model_type/data_type/datatype-property.json");
         ModelType modelType = new ModelType();
         modelType.setDefinitionType(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE);
         modelType.setDerivedFrom(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT);
         modelType.setDescription("Definition for Sample Datatype ");
-        modelType.setDefinition(JacksonUtils.jsonNode(content));
+        modelType.setDefinition(JacksonUtils.Companion.jsonNode(content));
         modelType.setModelName(modelName);
         modelType.setVersion("1.0.0");
         modelType.setTags("test-datatype ," + BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT + ","
