assertNotNull(heapMemoryUsage);
assertEquals("object representing the heap memory usage.", heapMemoryUsage.getDescription());
CompositeValue heapMemoryUsageMV = CompositeValue.class.cast(heapMemoryUsage.getValue());
assertNotNull(heapMemoryUsageMV);
getLog().debug("heapMemoryUsageMV; "+heapMemoryUsageMV);
MemoryUsage heapMemoryUsageMU = ManagementFactoryUtils.unwrapMemoryUsage(heapMemoryUsageMV);
assertTrue(heapMemoryUsageMU.getInit() >= 0);
assertTrue(heapMemoryUsageMU.getUsed() >= 1000);
assertTrue(heapMemoryUsageMU.getMax() >= heapMemoryUsageMU.getCommitted());
assertTrue(heapMemoryUsageMU.getCommitted() >= heapMemoryUsageMU.getUsed());
// nonHeapMemoryUsage
ManagedProperty nonHeapMemoryUsage = props.get("nonHeapMemoryUsage");
assertNotNull(nonHeapMemoryUsage);
assertEquals("object representing the non-heap memory usage.", nonHeapMemoryUsage.getDescription());
CompositeValue nonHeapMemoryUsageMV = CompositeValue.class.cast(nonHeapMemoryUsage.getValue());
assertNotNull(nonHeapMemoryUsageMV);
getLog().debug("nonHeapMemoryUsageMV; "+nonHeapMemoryUsageMV);
MemoryUsage nonHeapMemoryUsageMU = ManagementFactoryUtils.unwrapMemoryUsage(nonHeapMemoryUsageMV);
assertTrue(nonHeapMemoryUsageMU.getInit() >= 0);
assertTrue(nonHeapMemoryUsageMU.getUsed() >= 1000);
// Ignore undefined nonHeap max memory, seen with IBM JDK 6
if(nonHeapMemoryUsageMU.getMax() != -1)
assertTrue(nonHeapMemoryUsageMU.getMax() >= nonHeapMemoryUsageMU.getCommitted());
assertTrue(nonHeapMemoryUsageMU.getCommitted() >= nonHeapMemoryUsageMU.getUsed());
// objectPendingFinalizationCount
ManagedProperty objectPendingFinalizationCount = props.get("objectPendingFinalizationCount");
assertNotNull(objectPendingFinalizationCount);
assertEquals("the approximate number objects for which finalization is pending.", objectPendingFinalizationCount.getDescription());
MetaValue objectPendingFinalizationCountMV = objectPendingFinalizationCount.getValue();