### Question:
ResourceConsumptionManager implements IOFogModule { private float getCpuUsage() { logDebug("Start get cpu usage"); String processName = ManagementFactory.getRuntimeMXBean().getName(); String processId = processName.split("@")[0]; if (SystemUtils.IS_OS_LINUX) { Pair<Long, Long> before = parseStat(processId); waitForSecond(); Pair<Long, Long> after = parseStat(processId); logDebug("Finished get cpu usage : " + 100f * (after._1() - before._1()) / (after._2() - before._2())); return 100f * (after._1() - before._1()) / (after._2() - before._2()); } else if (SystemUtils.IS_OS_WINDOWS) { String response = getWinCPUUsage(processId); logInfo("Finished get cpu usage : " + response); return Float.parseFloat(response); } else { logDebug("Finished get cpu usage : " + 0f); return 0f; } } private  ResourceConsumptionManager(); @Override int getModuleIndex(); @Override String getModuleName(); static ResourceConsumptionManager getInstance(); void instanceConfigUpdated(); void start();  }### Answer:
@Test public void testGetCpuUsage() throws Exception{ method = ResourceConsumptionManager.class.getDeclaredMethod("getCpuUsage"); method.setAccessible(true); float response = (float) method.invoke(resourceConsumptionManager); PowerMockito.verifyStatic(LoggingService.class, Mockito.atLeastOnce()); LoggingService.logDebug(MODULE_NAME, "Start get cpu usage"); PowerMockito.verifyStatic(LoggingService.class, Mockito.atLeastOnce()); LoggingService.logDebug(MODULE_NAME, "Finished get cpu usage : " + response); }