### Question:
ResourceConsumptionManager implements IOFogModule { private void removeArchives(float amount) { logDebug("Start remove archives : " + amount); String archivesDirectory = Configuration.getDiskDirectory() + "messages/archive/"; final File workingDirectory = new File(archivesDirectory); File[] filesList = workingDirectory.listFiles((dir, fileName) -> fileName.substring(fileName.indexOf(".")).equals(".idx")); if (filesList != null) { Arrays.sort(filesList, (o1, o2) -> { String t1 = o1.getName().substring(o1.getName().indexOf('_') + 1, o1.getName().indexOf(".")); String t2 = o2.getName().substring(o2.getName().indexOf('_') + 1, o2.getName().indexOf(".")); return t1.compareTo(t2); }); for (File indexFile : filesList) { File dataFile = new File(archivesDirectory + indexFile.getName().substring(0, indexFile.getName().indexOf('.')) + ".iomsg"); amount -= indexFile.length(); indexFile.delete(); amount -= dataFile.length(); dataFile.delete(); if (amount < 0) break; } } logDebug("Finished remove archives : "); } private  ResourceConsumptionManager(); @Override int getModuleIndex(); @Override String getModuleName(); static ResourceConsumptionManager getInstance(); void instanceConfigUpdated(); void start();  }### Answer:
@Test public void testRemoveArchives() throws Exception{ float amount = 0f; method = ResourceConsumptionManager.class.getDeclaredMethod("removeArchives", float.class); method.setAccessible(true); method.invoke(resourceConsumptionManager, amount); PowerMockito.verifyStatic(LoggingService.class, Mockito.atLeastOnce()); LoggingService.logDebug(MODULE_NAME, "Start remove archives : " + amount); PowerMockito.verifyStatic(LoggingService.class, Mockito.atLeastOnce()); LoggingService.logDebug(MODULE_NAME, "Finished remove archives : "); PowerMockito.verifyStatic(Configuration.class, Mockito.atLeastOnce()); Configuration.getDiskDirectory(); }