@Test
  public void testRedundancyLevelSetThroughXML() {
    String path =
        createTempFileFromResource(getClass(), "RedundancyLevelJUnitTest.xml")
            .getAbsolutePath();

    Properties p = new Properties();
    p.setProperty(MCAST_PORT, "0");
    p.setProperty(LOCATORS, "");
    p.setProperty(CACHE_XML_FILE, path);
    final String addExpected = "<ExpectedException action=add>" + expected + "</ExpectedException>";

    system = DistributedSystem.connect(p);
    system.getLogWriter().info(addExpected);

    final String addExpectedPEM =
        "<ExpectedException action=add>" + expectedPrimaryErrorMsg + "</ExpectedException>";
    final String addExpectedREM =
        "<ExpectedException action=add>" + expectedRedundantErrorMsg + "</ExpectedException>";
    system.getLogWriter().info(addExpectedPEM);
    system.getLogWriter().info(addExpectedREM);

    try {

      cache = CacheFactory.create(system);
      assertNotNull("cache was null", cache);
      Region region = cache.getRegion(SEPARATOR + "root" + SEPARATOR + "exampleRegion");
      assertNotNull(region);
      Pool pool = PoolManager.find("clientPool");
      assertEquals("Redundancy level not matching the one specified in cache-xml", 6,
          pool.getSubscriptionRedundancy());
    } finally {
      final String removeExpected =
          "<ExpectedException action=remove>" + expected + "</ExpectedException>";
      system.getLogWriter().info(removeExpected);
    }
  }
Tests that value for redundancyLevel of the failover set is correctly picked via cache-xml
file.(Please note that the purpose of this test is to just verify that the value is initialized
correctly from cache-xml and so only client is started and the connection-exceptions due to no
live servers, which appear as warnings, are ignored.)
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java