### Question:
ResourceConsumptionManager implements IOFogModule { private float getMemoryUsage() { logDebug("Start get memory usage"); Runtime runtime = Runtime.getRuntime(); long allocatedMemory = runtime.totalMemory(); long freeMemory = runtime.freeMemory(); logDebug("Finished get memory usage : "+ (float)(allocatedMemory - freeMemory)); return (allocatedMemory - freeMemory); } private  ResourceConsumptionManager(); @Override int getModuleIndex(); @Override String getModuleName(); static ResourceConsumptionManager getInstance(); void instanceConfigUpdated(); void start();  }### Answer:
@Test public void testGetMemoryUsage() throws Exception{ method = ResourceConsumptionManager.class.getDeclaredMethod("getMemoryUsage"); method.setAccessible(true); float memoryUsage = (float) method.invoke(resourceConsumptionManager); PowerMockito.verifyStatic(LoggingService.class, Mockito.atLeastOnce()); LoggingService.logDebug(MODULE_NAME, "Start get memory usage"); PowerMockito.verifyStatic(LoggingService.class, Mockito.atLeastOnce()); LoggingService.logDebug(MODULE_NAME, "Finished get memory usage : " + memoryUsage); }