@Test public void parseHostMachine() { String old = System.getProperty("host_machine"); try { System.setProperty("host_machine", "xxx"); Assert.assertEquals("xxx", SystemInfo.parseHostMachine()); } finally { if (old == null) { System.clearProperty("host_machine"); } else { System.setProperty("host_machine", old); } } Assert.assertTrue(StringUtils.isEmpty(SystemInfo.getHostMachine())); }
@VisibleForTesting static String parseHostMachine() { String hostMachine = System.getProperty("host_machine"); return StringUtils.isNotEmpty(hostMachine) ? hostMachine : null; }
SystemInfo { @VisibleForTesting static String parseHostMachine() { String hostMachine = System.getProperty("host_machine"); return StringUtils.isNotEmpty(hostMachine) ? hostMachine : null; } }
SystemInfo { @VisibleForTesting static String parseHostMachine() { String hostMachine = System.getProperty("host_machine"); return StringUtils.isNotEmpty(hostMachine) ? hostMachine : null; }  }
SystemInfo { @VisibleForTesting static String parseHostMachine() { String hostMachine = System.getProperty("host_machine"); return StringUtils.isNotEmpty(hostMachine) ? hostMachine : null; }  static boolean isWindows(); static Boolean isLinux(); static boolean isMac(); static int getCpuCores(); static String getLocalHost(); static void setLocalHost(String localhost); static String getHostMachine(); }
SystemInfo { @VisibleForTesting static String parseHostMachine() { String hostMachine = System.getProperty("host_machine"); return StringUtils.isNotEmpty(hostMachine) ? hostMachine : null; }  static boolean isWindows(); static Boolean isLinux(); static boolean isMac(); static int getCpuCores(); static String getLocalHost(); static void setLocalHost(String localhost); static String getHostMachine();  }