@Test(expected = MappingException.class)
public void testLongToIntegerConverter_overflow() {
MapperFactory factory = MappingUtil.getMapperFactory();
factory.getConverterFactory().registerConverter(new LongToIntegerConverter(false));
MapperFacade mapper = factory.getMapperFacade();
Long value = (long) Integer.MAX_VALUE + 1;
Integer result = mapper.map(value, Integer.class);
Assert.assertEquals(value.longValue(), result.longValue());
Long reverse = mapper.map(result, Long.class);
Assert.assertEquals(result.longValue(), reverse.longValue());
}