--- /dev/null
+/**\r
+ * Copyright (c) 2017 ZTE Corporation.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * and the Apache License 2.0 which both accompany this distribution,\r
+ * and are available at http://www.eclipse.org/legal/epl-v10.html\r
+ * and http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Contributors:\r
+ * ZTE - initial API and implementation and/or initial documentation\r
+ */\r
+package org.onap.sdc.workflowdesigner.convert;\r
+\r
+import static org.junit.Assert.assertTrue;\r
+\r
+import java.io.File;\r
+import java.net.URI;\r
+import java.nio.file.Paths;\r
+\r
+import org.apache.velocity.exception.ParseErrorException;\r
+import org.apache.velocity.exception.ResourceNotFoundException;\r
+import org.junit.Test;\r
+import org.onap.sdc.workflowdesigner.converter.Bpmn4Tosca2Bpmn;\r
+\r
+public class BPMN4Tosca2BpmnTest {\r
+ private static String RESOURCES_DIR = "src/test/resources/workflow";\r
+\r
+ @Test\r
+ public void testTransform() throws ResourceNotFoundException, ParseErrorException, Exception {\r
+\r
+ URI srcUri = Paths.get(RESOURCES_DIR, "workflow.json").toUri();\r
+ URI targetUri = Paths.get(RESOURCES_DIR, "bpmnworkflow.bpmn20.xml").toUri();\r
+ BPMN4Tosca2BpmnTest.class.getResource(".");\r
+ Bpmn4Tosca2Bpmn transformer = new Bpmn4Tosca2Bpmn();\r
+ transformer.transform("transformTest", srcUri, targetUri);\r
+ assertTrue(new File(targetUri.getPath()).exists());\r
+ }\r
+\r
+}\r
--- /dev/null
+{"nodes":[\r
+ {\r
+ "sequenceFlows":[\r
+ {"condition":"","sourceRef":"node0","targetRef":"node1"},\r
+ {"condition":"","sourceRef":"node0","targetRef":"node3"}\r
+ ],\r
+ "parameters":[],"id":"node0","name":"startEvent","type":"startEvent","parentId":"root",\r
+ "position":{"width":30,"height":30,"left":468,"top":55}\r
+ },\r
+ {\r
+ "sequenceFlows":[{"condition":"","sourceRef":"node1","targetRef":"node2"}],\r
+ "input":[],"output":[],"template":{},"id":"node1","name":"endEvent",\r
+ "type":"endEvent","parentId":"root",\r
+ "position":{"width":252.08334350585938,"height":46.66666793823242,"left":432,"top":167}\r
+ }],\r
+"configs":{"restConfigs":[]}\r
+}
\ No newline at end of file