@Test
public void validateErMineralOccurrenceWithErrors() {

    try {
        AppSchemaValidator.validateResource("/test-data/er_MineralOccurrence_with_errors.xml", null);
        Assert.fail("Unexpected schema validation success for known-invalid XML instance document");
    } catch (Exception e) {
        Assert.assertTrue(
                e.getMessage(),
                e.getMessage().startsWith(
                        "Schema validation failures: 2" + System.getProperty("line.separator")));
    }
}