@SuppressWarnings("unused")
    @Test
    public void testLongMapsToEnumOutOfOrdinalRange() {
        LOG.error("WithExceptionsLoggedTest; 'MappingException: Cannot convert [3] to enum of type class com.github.dozermapper.core.vo.enumtest.SrcTypeWithOverride'");

        testLongMapsToEnumOutOfOrdinalRangeEE.expectMessage("Cannot convert [3] to enum of type class com.github.dozermapper.core.vo.enumtest.SrcTypeWithOverride");
        testLongMapsToEnumOutOfOrdinalRangeEE.expect(MappingException.class);

        mapper = getMapper("mappings/enumMapping.xml");

        MyBeanPrimeLong src = new MyBeanPrimeLong();
        src.setFirst(0L);
        src.setSecond(3L);

        MyBean dest = mapper.map(src, MyBean.class);
    }
Test on a mapping from long types to enum.
core/src/test/java/com/github/dozermapper/core/functional_tests/EnumMapping_WithExceptionsLoggedTest.java