Cluster communication channels
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / blueprints / blueprint-core / src / test / kotlin / org / onap / ccsdk / cds / controllerblueprints / core / CustomFunctionsTest.kt
index 3ae87b3..7ac9b86 100644 (file)
@@ -67,6 +67,17 @@ class CustomFunctionsTest {
         assertFalse(returnValue.asBoolean())
     }
 
+    @Test
+    fun testByteArrayJsonType() {
+        val jsonNode = """{"Name" :"Value"}""".jsonAsJsonType()
+
+        val byteArray = jsonNode.asByteArray()
+        assertNotNull(byteArray, "failed to get ByteArray form Json")
+
+        val reverseJsonNode = byteArray.asJsonType()
+        assertNotNull(reverseJsonNode, "failed to get Json type from ByteArray")
+    }
+
     @Test
     fun testAsJsonType() {
         val nullReturnValue: JsonNode = null.asJsonType()