@Test
  public void testObjectSizerForHeapLRU_CustomizedSizerObject() throws Exception {
    prepareScenario(EvictionAlgorithm.LRU_HEAP, new TestObjectSizerImpl());

    // Size of overhead= 49
    // Size of Integer key= 0(inlined)
    // Size of TestObjectSizerImpl= 160 (serialized size), changed to 156 because package changed to
    // org.apache.geode
    // Total Size of entry should be= 71
    putCustomizedData(1, new TestObjectSizerImpl());
    int expected = (0 + 156 + (Sizeable.PER_OBJECT_OVERHEAD * 2)
        + ((HeapLRUController) ((PartitionedRegion) region).getEvictionController())
            .getPerEntryOverhead());
    assertEquals(expected, getSizeOfCustomizedData(1));
    assertEquals(expected,
        ((PartitionedRegion) region).getEvictionController().getCounters().getCounter());
  }
With object sizer for customized value object implementing ObjectSizer .Key -Integer Value
TestObjectSizerImpl
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/eviction/EvictionObjectSizerDUnitTest.java