+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringDistributeTrafficCheck, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToBuilderPreRebuildTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PreRebuild;
+ String rpcName = convertActionNameToUrl(action.name());
+
+ String jsonStr = Converter.convAsyncResponseToJsonStringBody(action, rpcName, asyncResponse);
+ Assert.assertEquals(expectedJsonBodyStrwithPayload, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToDmaapOutgoingMessageJsonStringPreRebuildTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PreRebuild;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(action, rpcName, asyncResponse);
+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringPreRebuild, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToBuilderPostRebuildTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PostRebuild;
+ String rpcName = convertActionNameToUrl(action.name());
+
+ String jsonStr = Converter.convAsyncResponseToJsonStringBody(action, rpcName, asyncResponse);
+ Assert.assertEquals(expectedJsonBodyStrwithPayload, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToDmaapOutgoingMessageJsonStringPostRebuildTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PostRebuild;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(action, rpcName, asyncResponse);
+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringPostRebuild, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToBuilderPreEvacuateTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PreEvacuate;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToJsonStringBody(action, rpcName, asyncResponse);
+ Assert.assertEquals(expectedJsonBodyStrwithPayload, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToDmaapOutgoingMessageJsonStringPreEvacuateTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PreEvacuate;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(action, rpcName, asyncResponse);
+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringPreEvacuate, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToBuilderPreMigrateTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PreMigrate;
+ String rpcName = convertActionNameToUrl(action.name());
+
+ String jsonStr = Converter.convAsyncResponseToJsonStringBody(action, rpcName, asyncResponse);
+ Assert.assertEquals(expectedJsonBodyStrwithPayload, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToDmaapOutgoingMessageJsonStringPreMigrateTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PreMigrate;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(action, rpcName, asyncResponse);
+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringPreMigrate, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToBuilderPostMigrateTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PostMigrate;
+ String rpcName = convertActionNameToUrl(action.name());
+
+ String jsonStr = Converter.convAsyncResponseToJsonStringBody(action, rpcName, asyncResponse);
+ Assert.assertEquals(expectedJsonBodyStrwithPayload, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToDmaapOutgoingMessageJsonStringPostMigrateTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PostMigrate;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(action, rpcName, asyncResponse);
+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringPostMigrate, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToBuilderPostEvacuateTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PostEvacuate;
+ String rpcName = convertActionNameToUrl(action.name());
+
+ String jsonStr = Converter.convAsyncResponseToJsonStringBody(action, rpcName, asyncResponse);
+ Assert.assertEquals(expectedJsonBodyStrwithPayload, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToDmaapOutgoingMessageJsonStringPostEvacuateTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.PostEvacuate;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(action, rpcName, asyncResponse);
+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringPostEvacuate, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToBuilderStartTrafficTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.StartTraffic;
+ String rpcName = convertActionNameToUrl(action.name());
+
+ String jsonStr = Converter.convAsyncResponseToJsonStringBody(action, rpcName, asyncResponse);
+ Assert.assertEquals(expectedJsonBodyStrwithPayload, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToDmaapOutgoingMessageJsonStringStartTrafficTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.StartTraffic;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(action, rpcName, asyncResponse);
+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringStartTraffic, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToBuilderStatusTrafficTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.StatusTraffic;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToJsonStringBody(action, rpcName, asyncResponse);
+ Assert.assertEquals(expectedJsonBodyStrwithPayload, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToDmaapOutgoingMessageJsonStringStatusTrafficTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.StatusTraffic;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(action, rpcName, asyncResponse);
+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringStatusTraffic, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToDmaapOutgoingMessageJsonStringLicenseManagementTest()
+ throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.LicenseManagement;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(action, rpcName, asyncResponse);
+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringLicenseManagement,jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToBuilderLicenseManagementTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.LicenseManagement;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToJsonStringBody(action, rpcName, asyncResponse);
+ Assert.assertEquals(expectedJsonBodyStrwithPayload,jsonStr);
+ }
+ @Test
+ public void convAsyncResponseToDmaapOutgoingMessageJsonStringProvisioningTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.Provisioning;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(action, rpcName, asyncResponse);
+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringProvisioning,jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToBuilderProvisioningTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.Provisioning;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToJsonStringBody(action, rpcName, asyncResponse);
+ Assert.assertEquals(expectedJsonBodyStrwithPayload,jsonStr);
+ }
+ @Test
+ public void convAsyncResponseToBuilderStopTrafficTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.StopTraffic;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToJsonStringBody(action, rpcName, asyncResponse);
+ Assert.assertEquals(expectedJsonBodyStrwithPayload, jsonStr);
+ }
+
+ @Test
+ public void convAsyncResponseToDmaapOutgoingMessageJsonStringStopTrafficTest() throws JsonProcessingException {
+ ResponseContext asyncResponse = buildAsyncResponsewithPayload();
+ VNFOperation action = VNFOperation.StopTraffic;
+ String rpcName = convertActionNameToUrl(action.name());
+ String jsonStr = Converter.convAsyncResponseToDmaapOutgoingMessageJsonString(action, rpcName, asyncResponse);
+ System.out.println("jsonStr = " + jsonStr);
+ Assert.assertEquals(expectedDmaapOutgoingMessageJsonStringStopTraffic, jsonStr);