//package com.eactive.eai.transformer;
//
//import com.eactive.eai.common.util.Logger;
//import com.eactive.eai.transformer.engine.TransformEngine;
//import com.eactive.eai.transformer.engine.Transformer;
//import com.eactive.eai.transformer.message.Message;
//import com.eactive.eai.transformer.message.MessageFactory;
//import com.eactive.eai.transformer.message.UJSONMessage;
//
//import junit.framework.Test;
//import junit.framework.TestCase;
//import junit.framework.TestSuite;
//
//
//public class TransformJsonToXml extends TestCase {
//	protected static Logger logger = Logger.getLogger("transformer");
//
//	TransformEngine engine = null;
//    
//    
//    public TransformJsonToXml(String name) {
//        super(name);
//    }
//
//    public static Test suite() {
//        /*
//        * the dynamic way
//        */
//        return new TestSuite(TransformJsonToXml.class);
//    }
//
//    public void setUp() throws Exception {
//        // 변환 초기화
//        engine = TransformEngine.getInstance();
//
//        if (!engine.isStarted()) {
//            engine.start();
//        }
//    }
//
//    public void tearDown() throws Exception {
//        //
//    }
//    
//
//    public void testJsonToXmlTransform() throws Exception {
//  		System.out.println("Json TO XML  ==============================================================");
//        //logger.debug("Transform08900001Test | testTransform()");
//
//        //----------------------------------------------------------------------
//        // source message 생성
//        //----------------------------------------------------------------------
//    	String data ="";
//    	data = "{\"BND_KJO71B09R0_REQ1\":{\"InData\":{\"grid1\":[{\"aprval1stAthorScrenCtnt\":\"BND72330000\",\"mblRetunAbilYn\":\"0\",\"aprvalDmndBrncd\":null,\"n2ndAprvalEmpid\":null,\"aprvalLineIdnfiNo\":\"3020000009\",\"mblAprvalComtYn\":\"1\",\"aprval2ndAthorScrenLinkCtnt2\":null,\"mblAprvalIdiviAtchCtnt\":\"#P# 등록자 : 허병회#\\/P##P# 민원인명 : 재테스#\\/P##P# 접수번호 : 20-000009#\\/P##P# 피해보상신청금액 : 11,223#\\/P##P# 피해보상유형 : 부점자체처리(상담오류)#\\/P##P# 합의서작성여부 : 작성#\\/P##P# 민원요지#\\/P##D#111111#\\/D#\",\"aprval2ndAthorScrenLinkCtnt3\":null,\"aprval2ndAthorScrenLinkCtnt4\":null,\"aprval2ndAthorScrenLinkCtnt5\":null,\"aprval2ndAthorScrenCtnt\":null,\"aprvalDmndScrenName\":\"소비자피해보상 등록 및 처리\",\"aprval2ndAthorRoleCtnt\":null,\"aprval2ndAthorScrenLinkCtnt1\":null,\"aprvalDmndEmpid\":\"3825432\",\"aprval1stAthorScrenName\":\"소비자 피해보상 소비자보호담당자\\/부점장 승인\",\"aprvalDmndEmpHanglFname\":null,\"aprvalDmndScrenCtnt\":\"BND72320000\",\"aprvalDmndBrnHanglName\":null,\"aprval1stAthorRoleCtnt\":\"17101\",\"mblCallgTranCdCtnt\":\"BND73330U1\",\"mblAprvalCmnAtchCtnt\":\"20000009\",\"aprval1stAthorRoleName\":null,\"aprvalLineFixYn\":\"0\",\"mblAprvalAthorURL\":null,\"aprval2ndAthorScrenName\":null,\"aprval2ndAthorRoleName\":null,\"brncdInquryDstcd\":\"1\",\"n1stAprvalEmpid\":null,\"aprval1stAthorScrenLinkCtnt1\":null,\"aprval1stAthorScrenLinkCtnt3\":null,\"mblAprvalTagetYn\":\"1\",\"aprval1stAthorScrenLinkCtnt2\":null,\"uapplCd\":\"BND\",\"aprval1stAthorScrenLinkCtnt5\":null,\"aprval1stAthorScrenLinkCtnt4\":null}]}}}";
//
//    	
//        Message source = MessageFactory.getFactory().getMessage("BND_KJO71B09R0_REQ1");
//        
//		String rootItemName = ((UJSONMessage)source).getLayout().getRootItem().getName();
//
////        JSONObject value = (JSONObject)JSONValue.parse(data);
////        JSONObject root = new JSONObject();
////        root.put(rootItemName, value);
////        data = root.toJSONString();  
//
//        System.out.println("before="+source);
//        source.setData(data);
//        System.out.println("source="+source);
//
//        //----------------------------------------------------------------------
//        // 변환 방식 1
//        //----------------------------------------------------------------------
//        Transformer transformer = engine.getTransformer();
//        Message target = transformer.transform("TRANSFORM_BND_KJO71B09R0BND_REQ", new Message[] { source });
//
//        System.out.println(target.toString());
//        
//    }
////  public void testFlatToJsonTransform2() throws Exception {
////		System.out.println("Flat TO Json ==============================================================");
////    //----------------------------------------------------------------------
////    // source message 생성
////    //----------------------------------------------------------------------
////	String data ="00                                                                                                                    0000100023";
////    Message source = MessageFactory.getFactory().getMessage("TST_CCMMCI0023RS1JBB_REQ2");
////    source.setData(data.getBytes());
//////    System.out.println(source);
////
////    //----------------------------------------------------------------------
////    // 변환 방식 1
////    //----------------------------------------------------------------------
////    Transformer transformer = engine.getTransformer();
////    Message target = transformer.transform("TRANSFORM_TST_CCMMCI9999S1_RES", new Message[] { source });
////
////    
//////    System.out.println(target);
////    System.out.println(target.toString());
////    System.out.println("testFlatToJsonTransform >> [["+target.getData()+"]]");
////    
////}        
//    
//}
