SigarNodeInfoProvider { public Map<Object, Object> getNodeOSInfo() { OperatingSystem os = null; Map<Object, Object> nodeOSInfo = new HashMap<Object, Object>(); os = OperatingSystem.getInstance(); nodeOSInfo.put("arch", os.getArch()); nodeOSInfo.put("cpuEndian", os.getCpuEndian()); nodeOSInfo.put("dataModel", os.getDataModel()); nodeOSInfo.put("description", os.getDescription()); nodeOSInfo.put("machineName", os.getMachine()); nodeOSInfo.put("patchlevel", os.getPatchLevel()); nodeOSInfo.put("systemVersion", os.getVersion()); nodeOSInfo.put("vendor", os.getVendor()); nodeOSInfo.put("vendorCodeName", os.getVendorCodeName()); nodeOSInfo.put("vendorVersion", os.getVendorVersion()); return nodeOSInfo; } SigarNodeInfoProvider(); Map<Object, Object> getNodeMemoryInfo(); List<Map<Object, Object>> getNodeCpuInfos(); Map<Object, Object> getNodeSwapInfo(); List<Map<Object, Object>> getNodeNetworkInfos(); Map<Object, Object> getNodeOSInfo(); Map<Object, Object> getNodeUpTimeInfo(); List<Map<Object, Object>> getNodeDiskInfos(); List<Map<Object, Object>> getSortedListByItem(final String item); Map<String, Object> getNodeInfo(int topProcessCount); static final char SLEEP; static final char RUN; static final char STOP; static final char ZOMBIE; static final char IDLE; static final int HUNDRED; static final int NUMBER_1024; }
@Test public void testGetNodeOSInfoFunction() { assertEquals(HashMap.class, provider.getNodeOSInfo().getClass()); assert(provider.getNodeOSInfo() != null); }