public static void sizerTestForMemCapacityController(Integer port) {
    region = cache.getRegion(
        SEPARATOR + CacheServerImpl.generateNameForClientMsgsRegion(port));
    assertNotNull(region);
    Set entries = region.entrySet();
    assertTrue(entries.size() > 0);
    Iterator iter = entries.iterator();
    for (; iter.hasNext();) {
      Region.Entry entry = (Region.Entry) iter.next();
      ClientUpdateMessageImpl cum = (ClientUpdateMessageImpl) entry.getValue();
      // passed null to get the size of value ie CUM only ,
      // but this function also add overhead per entry
      // so to get exact size calculated by memCapacityController
      // we need substract this over head
      int perEntryOverhead = ((MemoryLRUController) cc).getPerEntryOverhead();
      assertEquals(cum.getSizeInBytes(), cc.entrySize(null, entry.getValue()) - perEntryOverhead);
    }
    cache.getLogger().fine("Test passed. Now, doing a cleanup job.");
    // added here as sleep should be on server where CMR is present and
    // dispacher supposed to run
    cleanUp(20000L);
  }
Check for size return by ClientUpdateMessagesImpl getSizeInByte() with size return by
memCapacity controller

@param port - BridgeServer port required to get ClientMessagesRegion
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/HAOverflowMemObjectSizerDistributedTest.java