SysInfoWindows extends SysInfo { @Override public long getAvailablePhysicalMemorySize() { refreshIfNeeded(); return memAvailable; } SysInfoWindows(); @Override long getVirtualMemorySize(); @Override long getPhysicalMemorySize(); @Override long getAvailableVirtualMemorySize(); @Override long getAvailablePhysicalMemorySize(); @Override synchronized int getNumProcessors(); @Override int getNumCores(); @Override long getCpuFrequency(); @Override long getCumulativeCpuTime(); @Override synchronized float getCpuUsagePercentage(); @Override synchronized float getNumVCoresUsed(); @Override long getNetworkBytesRead(); @Override long getNetworkBytesWritten(); @Override long getStorageBytesRead(); @Override long getStorageBytesWritten();  }
@Test(timeout = 10000) public void errorInGetSystemInfo() { SysInfoWindowsMock tester = new SysInfoWindowsMock(); tester.setSysinfoString(null); tester.getAvailablePhysicalMemorySize(); tester.setSysinfoString(""); tester.getAvailablePhysicalMemorySize(); }