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

    // Size of overhead= 49
    // Size of Integer key= 0(inlined)
    // Size of Byte Array(1 MB) + overhead (16 bytes)= 1048592 + 16
    // Total Size of each entry should be= 1048592

    putData("PR1", 2, 1);

    {
      int keySize = 0;
      int valueSize =
          JvmSizeUtils.getObjectHeaderSize() + 4 /* array length */ + (1024 * 1024) /* bytes */;
      valueSize = roundUpSize(valueSize);
      int entrySize = keySize + valueSize
          + ((HeapLRUController) ((PartitionedRegion) region).getEvictionController())
              .getPerEntryOverhead();
      verifySize("PR1", 2, entrySize);
    }

    // Size of overhead= 49
    // Size of Integer key= 0(inlined)
    // Size of Byte Array(2 MB) + overhead= 2097152 + 16
    // Total Size of each entry should be= 2097201

    {
      putData("PR1", 2, 2);
      int keySize = 0;
      int valueSize = JvmSizeUtils.getObjectHeaderSize() + 4 /* array length */
          + (1024 * 1024 * 2) /* bytes */;
      valueSize = roundUpSize(valueSize);
      int entrySize = keySize + valueSize
          + ((HeapLRUController) ((PartitionedRegion) region).getEvictionController())
              .getPerEntryOverhead();
      verifySize("PR1", 2, entrySize);
    }
  }
With object sizer for standard objects.Key -Integer Value ByteArray
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/eviction/EvictionObjectSizerDUnitTest.java