@Test
    public void testError() {
        long maxLong = Long.MAX_VALUE;
        long minLong = Long.MIN_VALUE;

        double maxDouble = Double.MAX_VALUE;
        double minDouble = Double.MIN_VALUE;

        try {
            helper.getConvertor(Long.class, Integer.class).convert(maxLong, Integer.class);
            Assert.fail();// 不会走到这一步
        } catch (BeanMappingException e) {
        }

        try {
            helper.getConvertor(Long.class, byte.class).convert(minLong, byte.class);
            Assert.fail();// 不会走到这一步
        } catch (BeanMappingException e) {
        }

        try {
            helper.getConvertor(Long.class, short.class).convert(maxLong, short.class);
            Assert.fail();// 不会走到这一步
        } catch (BeanMappingException e) {
        }

        try {
            helper.getConvertor(Long.class, long.class).convert(minLong, long.class);
        } catch (BeanMappingException e) {
            Assert.fail();// 不会走到这一步
        }

        try {
            helper.getConvertor(Double.class, float.class).convert(maxDouble, float.class);
            Assert.fail();// 不会走到这一步
        } catch (BeanMappingException e) {
        }

        try {
            helper.getConvertor(Double.class, double.class).convert(minDouble, double.class);
        } catch (BeanMappingException e) {
            Assert.fail();// 不会走到这一步
        }

        Object bigIntegerValue = helper.getConvertor(Long.class, BigInteger.class).convert(maxLong, BigInteger.class);
        assertEquals(bigIntegerValue, BigInteger.valueOf(maxLong));

        Object bigDecimalValue = helper.getConvertor(Double.class, BigDecimal.class).convert(maxDouble,
                                                                                             BigDecimal.class);
        assertEquals(bigDecimalValue, BigDecimal.valueOf(maxDouble));

        try {
            helper.getConvertor(Long.class, boolean.class).convert(maxLong, float.class);
        } catch (BeanMappingException e) {
            Assert.fail();// 不会走到这一步
        }

        try {
            helper.getConvertor(Long.class, char.class).convert(maxLong, char.class);
        } catch (BeanMappingException e) {
            Assert.fail();// 不会走到这一步
        }

    }