@Test
  public void testLargeGetInitialImage() {
    assumeThat(supportsReplication()).isTrue();

    final String name = getUniqueName();
    final Integer[] keys = new Integer[NUM_ENTRIES];
    final byte[][] values = new byte[NUM_ENTRIES][];

    for (int i = 0; i < NUM_ENTRIES; i++) {
      keys[i] = i;
      values[i] = new byte[VALUE_SIZE];
      Arrays.fill(values[i], (byte) 0x42);
    }

    SerializableRunnable create = new CacheSerializableRunnable() {
      @Override
      public void run2() throws CacheException {
        RegionAttributes<?, ?> ra = getRegionAttributes();
        RegionFactory<?, ?> factory = getCache().createRegionFactory(ra);
        if (ra.getEvictionAttributes() == null
            || !ra.getEvictionAttributes().getAction().isOverflowToDisk()) {
          factory.setDiskStoreName(null);
        }
        factory.setDataPolicy(DataPolicy.REPLICATE);
        createRegion(name, factory);
      }
    };

    vm0.invoke("Create Mirrored Region", create);

    vm0.invoke("Put data", () -> {
      Region<Integer, byte[]> region = getRootRegion().getSubregion(name);
      for (int i = 0; i < NUM_ENTRIES; i++) {
        region.put(keys[i], values[i]);
      }
    });

    vm2.invoke("Create Mirrored Region", create);

    // Destroy the local entries so we know that they are not found by
    // a netSearch
    vm0.invoke("Remove local entries", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      region.localDestroyRegion();
    });

    vm2.invoke("Verify keys/values", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      assertThat(region.entrySet(false).size()).isEqualTo(NUM_ENTRIES);
      for (int i = 0; i < NUM_ENTRIES; i++) {
        Region.Entry entry = region.getEntry(keys[i]);
        assertThat(entry).isNotNull();
        if (!(entry.getValue() instanceof byte[])) {
          fail("getValue returned a " + entry.getValue().getClass()
              + " instead of the expected byte[]");
        }
        assertThat(Arrays.equals(values[i], (byte[]) entry.getValue())).isTrue();
      }
    });
  }
Tests that a newly-created mirrored region contains all of the entries of another region, with
a large quantity of data.
geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java