@Test
  public void testRegionMulticastSetViaCacheXml() throws Exception {
    final String rNameBase = getUniqueName();
    final String r1 = rNameBase + "1";
    final String r2 = rNameBase + "2";
    final String r3 = rNameBase + "3";

    // Setting multi-cast via nested region attributes
    CacheCreation creation = new CacheCreation();
    RegionAttributesCreation attrs = new RegionAttributesCreation(creation);
    attrs.setScope(Scope.LOCAL);
    attrs.setEarlyAck(false);
    attrs.setMulticastEnabled(true);
    creation.createRegion(r1, attrs);

    // Setting multi-cast via named region attributes
    final String attrId = "region_attrs_with_multicast";
    attrs = new RegionAttributesCreation(creation);
    attrs.setId(attrId);
    attrs.setScope(Scope.DISTRIBUTED_NO_ACK);
    attrs.setEarlyAck(false);
    attrs.setMulticastEnabled(true);
    creation.setRegionAttributes(attrs.getId(), attrs);
    attrs = new RegionAttributesCreation(creation);
    attrs.setRefid(attrId);
    creation.createRegion(r3, attrs);

    testXml(creation);

    creation = new CacheCreation();
    attrs = new RegionAttributesCreation(creation);
    attrs.setScope(Scope.DISTRIBUTED_ACK);
    attrs.setEarlyAck(false);
    attrs.setMulticastEnabled(true);
    creation.createRegion(r2, attrs);

    Cache c = getCache();
    assertTrue(c instanceof GemFireCacheImpl);
    c.loadCacheXml(generate(creation));

    {
      Region reg1 = c.getRegion(r1);
      assertNotNull(reg1);
      assertEquals(Scope.LOCAL, reg1.getAttributes().getScope());
      assertFalse(reg1.getAttributes().getEarlyAck());
      assertTrue(reg1.getAttributes().getMulticastEnabled());
    }

    {
      Region reg2 = c.getRegion(r2);
      assertNotNull(reg2);
      assertEquals(Scope.DISTRIBUTED_ACK, reg2.getAttributes().getScope());
      assertFalse(reg2.getAttributes().getEarlyAck());
      assertTrue(reg2.getAttributes().getMulticastEnabled());
    }

    {
      Region reg3 = c.getRegion(r3);
      assertNotNull(reg3);
      assertEquals(Scope.DISTRIBUTED_NO_ACK, reg3.getAttributes().getScope());
      assertFalse(reg3.getAttributes().getEarlyAck());
      assertTrue(reg3.getAttributes().getMulticastEnabled());
    }
  }
Tests that loading cache XML with multi-cast set will set the multi-cast
geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml66DUnitTest.java