@Test
  public void testBadScope() throws Exception {
    setXmlFile(findFile("badScope.xml"));

    IgnoredException expectedException =
        addIgnoredException("While reading Cache XML file");
    try {
      getCache();
      fail("Should have thrown a CacheXmlException");

    } catch (CacheXmlException ex) {
      assertTrue(ex.getCause() instanceof SAXException);
    } finally {
      expectedException.remove();
    }
  }
Tests parsing an XML file with a bad scope. This error should be caught by the XML parser.
geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml66DUnitTest.java