@Test
  public void testNetLoadAdviceWithAttributesMutator() throws Exception {
    final String rgnName = getUniqueName();

    AttributesFactory fac = new AttributesFactory();
    fac.setScope(Scope.DISTRIBUTED_ACK);
    RegionAttributes attrs = fac.create();
    DistributedRegion rgn = (DistributedRegion) createRegion(rgnName, attrs);

    Invoke.invokeInEveryVM(new CacheSerializableRunnable(
        "CachAdvisorTest.testNetLoadAdviceWithAttributesMutator;createRegion") {
      @Override
      public void run2() throws CacheException {
        AttributesFactory f = new AttributesFactory();
        f.setScope(Scope.DISTRIBUTED_ACK);
        createRegion(rgnName, f.create());
      }
    });

    Set expected = new HashSet();
    for (int i = 1; i < vms.length; i += 2) {
      VM vm = vms[i];
      final int numVMsMinusOne = vms.length;
      InternalDistributedMember id = ids[i];
      expected.add(id);
      // final int index = i;
      vm.invoke(new CacheSerializableRunnable(
          "CacheAdvisorDUnitTest.testNetLoadAdviceWithAttributesMutator;mutate") {
        @Override
        public void run2() throws CacheException {
          Region rgn1 = getRootRegion().getSubregion(rgnName);
          assertEquals(numVMsMinusOne,
              ((DistributedRegion) rgn1).getDistributionAdvisor().adviseGeneric().size());
          AttributesMutator mut = rgn1.getAttributesMutator();
          mut.setCacheLoader(new CacheLoader() {
            @Override
            public Object load(LoaderHelper helper) throws CacheLoaderException {
              return null;
            }

            @Override
            public void close() {}
          });
        }
      });
    }

    await()
        .untilAsserted(
            () -> assertEquals(expected, rgn.getCacheDistributionAdvisor().adviseNetLoad()));
  }
Accessed via reflection. DO NOT REMOVE
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/CacheAdvisorDUnitTest.java