diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java index f36ff78..5413e09 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java @@ -378,9 +378,12 @@ public class SmartgearResourcesTest extends ContextTest { OperatingSystemMXBean mxbean = ManagementFactory .getOperatingSystemMXBean(); + @SuppressWarnings("restriction") com.sun.management.OperatingSystemMXBean sunmxbean = (com.sun.management.OperatingSystemMXBean) mxbean; + @SuppressWarnings("restriction") long freeMemory = sunmxbean.getFreePhysicalMemorySize() / 1048576; // in // MB + @SuppressWarnings("restriction") long totalMemory = sunmxbean.getTotalPhysicalMemorySize() / 1048576; // in // MB