private void fillAllMemoryWithPuts(
      final Region<TestObjectWithIdentifier, TestObjectWithIdentifier> region, final int objectId) {
    PartitionedRegion partitionedRegion = (PartitionedRegion) region;
    assertThat(partitionedRegion.getLocalMaxMemory()).isEqualTo(LOCAL_MAX_MEMORY);

    PartitionedRegionDataStore dataStore = partitionedRegion.getDataStore();
    for (int i = 0; dataStore.currentAllocatedMemory() <= EXPECTED_LOCAL_MAX_MEMORY; i++) {
      TestObjectWithIdentifier id =
          new TestObjectWithIdentifier("TestObjectWithIdentifier-" + i, objectId);
      region.put(id, id);
    }
    assertThat(dataStore.getLocalBucket2RegionMap()).hasSize(1);
  }
This test makes sure that we don't enforce the LOCAL_MAX_MEMORY setting when eviction is
enabled.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionLocalMaxMemoryDUnitTest.java