@Test
    public void testNoClassA() {
        LOG.error("WithExceptionsLoggedTest; 'MappingException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'class-b'. "
                  + "One of '{\"http://dozermapper.github.io/schema/bean-mapping\":class-a}' is expected.'");

        //NOTE: Java8 and Java9 return different error messages...
        //testNoClassAEE.expectMessage(Matchers.containsString("cvc-complex-type.2.4.a: Invalid content was found starting with element 'class-b'. "
        //                                                     + "One of '{\"http://dozermapper.github.io/schema/bean-mapping\":class-a}' is expected."));
        testNoClassAEE.expect(MappingException.class);

        mapper = getMapper("non-strict/invalidmapping5.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