private void prepareScenario(EvictionAlgorithm evictionAlgorithm, ObjectSizer sizer) {
    createMyCache();
    createPartitionedRegion(true, evictionAlgorithm, "PR1", 1, 1, 10000, sizer);
  }
With object sizer for customized key and value objects.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/eviction/EvictionObjectSizerDUnitTest.java