@Test
    public void testEmptyFieldB() {
        LOG.error("WithExceptionsLoggedTest; 'MappingException: Field name can not be empty'");

        testEmptyFieldBEE.expectMessage("Field name can not be empty");
        testEmptyFieldBEE.expect(MappingException.class);

        mapper = getMapper("mappings/invalidmapping3.xml");
        mapper.map("1", Integer.class);

        fail();
    }
Messages of SAXExceptions are localized, so we have to set the language to English as expected by the tests.
core/src/test/java/com/github/dozermapper/core/functional_tests/InvalidMapping_WithExceptionsLoggedTest.java