assertEquals(new Integer(runtime.availableProcessors()), kernel.getAttribute(JVM_DATA.getAbstractName(), "availableProcessors"));
}
public void testStatistics() throws Exception {
assertEquals(Boolean.TRUE, kernel.getAttribute(JVM_DATA.getAbstractName(), "statisticsProvider"));
JVMStats stats = (JVMStats) kernel.getAttribute(JVM_DATA.getAbstractName(), "stats");
assertNotNull(stats.getHeapSize());
assertTrue(stats.getHeapSize().getCurrent() > 0);
assertNotNull(stats.getHeapSize().getDescription());
assertTrue(stats.getHeapSize().getHighWaterMark() > 0);
assertTrue(stats.getHeapSize().getLastSampleTime() > 0);
assertTrue(stats.getHeapSize().getLowerBound() == 0);
assertTrue(stats.getHeapSize().getLowWaterMark() > 0);
assertNotNull(stats.getHeapSize().getName());
assertTrue(stats.getHeapSize().getStartTime() > 0);
assertNotNull(stats.getHeapSize().getUnit());
assertTrue(stats.getHeapSize().getUpperBound() > 0);
assertNotNull(stats.getUpTime());
assertTrue(stats.getUpTime().getCount() > 0);
assertNotNull(stats.getUpTime().getDescription());
assertTrue(stats.getUpTime().getLastSampleTime() > 0);
assertNotNull(stats.getUpTime().getName());
assertTrue(stats.getUpTime().getStartTime() > 0);
assertNotNull(stats.getUpTime().getUnit());
}