private void assertOffHeapMetricsOnVm(final VM vm, final int freeMemory,
      final int allocatedMemory, final int objects, final int fragmentation) {
    vm.invoke(() -> assertOffHeapMetrics(freeMemory, allocatedMemory, objects, fragmentation));
  }
Asserts that OffHeapMetrics match input parameters for a VM.

@param vm a virtual machine.
@param freeMemory total off-heap free memory in bytes.
@param allocatedMemory allocated (or used) off-heap memory in bytes.
@param objects number of objects stored in off-heap memory.
@param fragmentation the fragmentation percentage.
geode-core/src/distributedTest/java/org/apache/geode/management/OffHeapManagementDUnitTest.java