// Path: src/main/java/org/fintx/lang/Encoding.java
// public enum Encoding implements Codeable<String> {
//     UTF_8("UTF-8"), GBK("GBK"), GB18030("GB18030");
//     private String code;
// 
//     private Encoding(String code) {
//         this.code = code;
//     }
// 
//     @Override
//     public String getCode() {
//         // TODO Auto-generated method stub
//         return code;
//     }
// }


import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBException;
import org.fintx.lang.Encoding;
import net.sf.cglib.beans.BeanCopier;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
import java.sql.Date;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;

        Assert.assertTrue(10 == bytes.length);
        int[] ints = Objects.deepClone(new int[10]);
        Assert.assertTrue(10 == ints.length);
        PoJo pojo = new PoJo();
        pojo.setIn(0);
        ints[0] = 1;
        pojo.setIns(ints);
        pojo.setObjs(new Object[10]);
        pojo.getObjs() [0]="s";
        pojo.setStr("aa");
        pojo.setStrs(new String[3]);
        bytes[9] = 10;
        pojo.setBytes(bytes);
        pojo.getBytes()[2] = 1;
        List<String> list=new ArrayList<String>();
        list.add("a");
        list.add("b");
        pojo.setList(list);
        String xml = Objects.Xml.toString(pojo);
        System.out.println(xml);
        PoJo pojo2 = Objects.Xml.toObject(xml, PoJo.class);
        Assert.assertTrue(0 == pojo2.getIn());
        Assert.assertTrue(1 == pojo2.getIns()[0]);
        Assert.assertTrue("aa".equals(pojo2.getStr()));
        Assert.assertTrue(10 == pojo2.getBytes()[9]);
        Assert.assertTrue("b".equals(pojo2.getList().get(1)) );
        PoJo2 pojo3=new PoJo2();
        Objects.copyProperties(pojo, pojo3);
        Map<String,String> mapper=new HashMap<String,String>();
        mapper.put("www.adtec.com.cn", "adt");

// Path: src/main/java/org/fintx/lang/Encoding.java
// public enum Encoding implements Codeable<String> {
//     UTF_8("UTF-8"), GBK("GBK"), GB18030("GB18030");
//     private String code;
// 
//     private Encoding(String code) {
//         this.code = code;
//     }
// 
//     @Override
//     public String getCode() {
//         // TODO Auto-generated method stub
//         return code;
//     }
// }


// Path: src/test/java/org/fintx/util/ObjectsTest.java
import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBException;
import org.fintx.lang.Encoding;
import net.sf.cglib.beans.BeanCopier;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
import java.sql.Date;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;

        Assert.assertTrue(10 == bytes.length);
        int[] ints = Objects.deepClone(new int[10]);
        Assert.assertTrue(10 == ints.length);
        PoJo pojo = new PoJo();
        pojo.setIn(0);
        ints[0] = 1;
        pojo.setIns(ints);
        pojo.setObjs(new Object[10]);
        pojo.getObjs() [0]="s";
        pojo.setStr("aa");
        pojo.setStrs(new String[3]);
        bytes[9] = 10;
        pojo.setBytes(bytes);
        pojo.getBytes()[2] = 1;
        List<String> list=new ArrayList<String>();
        list.add("a");
        list.add("b");
        pojo.setList(list);
        String xml = Objects.Xml.toString(pojo);
        System.out.println(xml);
        PoJo pojo2 = Objects.Xml.toObject(xml, PoJo.class);
        Assert.assertTrue(0 == pojo2.getIn());
        Assert.assertTrue(1 == pojo2.getIns()[0]);
        Assert.assertTrue("aa".equals(pojo2.getStr()));
        Assert.assertTrue(10 == pojo2.getBytes()[9]);
        Assert.assertTrue("b".equals(pojo2.getList().get(1)) );
        PoJo2 pojo3=new PoJo2();
        Objects.copyProperties(pojo, pojo3);
        Map<String,String> mapper=new HashMap<String,String>();
        mapper.put("www.adtec.com.cn", "adt");

        ObjectXmls xmlConvertor = Objects.Xml.custom(mapper, false, Encoding.GB18030, false, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
