@@ -0,0 +1,2589 @@
+/*%0A * Copyright (C) 2008 feilong%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *         http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.feilong.core.bean.convertutiltest;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.net.URL;%0A%0Aimport org.apache.commons.beanutils.ConversionException;%0Aimport org.junit.Test;%0A%0Aimport static com.feilong.core.bean.ConvertUtil.convert;%0A%0Apublic class ConvertUtilConvertClassTest%7B%0A%0A    //    /** The Constant log. */%0A    //    private static final Logger LOGGER = LoggerFactory.getLogger(ConvertUtilConvertClassTest.class);%0A    //%0A    //    /**%0A    //     * To t test.%0A    //     */%0A    //    @Test%0A    //    public void testConvert()%7B%0A    //        String%5B%5D tokenizeToStringArray = StringUtil.tokenizeToStringArray(%226%22, %22_%22);%0A    //%0A    //        LinkedList%3CSerializable%3E linkedList = new LinkedList%3CSerializable%3E();%0A    //%0A    //        for (String string : tokenizeToStringArray)%7B%0A    //            Serializable t = ConvertUtil.convert(string, Serializable.class);%0A    //            LOGGER.debug(t.getClass().getCanonicalName());%0A    //            linkedList.add(t);%0A    //        %7D%0A    //%0A    //        Serializable l = 6L;%0A    //%0A    //        LOGGER.debug(%22linkedList:%7B%7D,contains:%7B%7D,%7B%7D%22, linkedList, l, linkedList.contains(l));%0A    //    %7D%0A%0A    /**%0A     * Test convert2.%0A     */%0A    @Test%0A    public void testConvert2()%7B%0A        assertEquals(1, convert(%221%22, Integer.class).intValue());%0A        assertEquals(1, convert(%221%22, Long.class).intValue());%0A        assertEquals(0, convert(%22%22, Integer.class).intValue());%0A    %7D%0A%0A    /**%0A     * Test to URL.%0A     */%0A    @Test(expected = ConversionException.class)%0A    public void testToURL()%7B%0A        String spec = %22C:%5C%5CUsers%5C%5Cfeilong%5C%5Cfeilong%5C%5Ctrain%5C%5C%E6%96%B0%E5%91%98%E5%B7%A5%5C%5CwarmReminder%5C%5C20160704141057.html%22;%0A        URL url = convert(spec, URL.class); //%E5%BC%82%E5%B8%B8%0A%0A        //MalformedURLException ConversionException%0A    %7D%0A%0A    @Test(expected = NullPointerException.class)%0A    public void testConvertTargetType()%7B%0A        String spec = %22C:%5C%5CUsers%5C%5Cfeilong%5C%5Cfeilong%5C%5Ctrain%5C%5C%E6%96%B0%E5%91%98%E5%B7%A5%5C%5CwarmReminder%5C%5C20160704141057.html%22;%0A        convert(spec, null);%0A    %7D%0A%7D%0A

add ConvertUtilConvertClassTest fix #385