ConfigUtils { public static int getPid() { if (PID < 0) { try { RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean(); String name = runtime.getName(); PID = Integer.parseInt(name.substring(0, name.indexOf('@'))); } catch (Throwable e) { PID = 0; } } return PID; } private  ConfigUtils(); static boolean isNotEmpty(String value); static boolean isEmpty(String value); static boolean isDefault(String value); static List<String> mergeValues(Class<?> type, String cfg, List<String> def); static String replaceProperty(String expression, Map<String, String> params); static Properties getProperties(); static void setProperties(Properties properties); static void addProperties(Properties properties); static String getProperty(String key); @SuppressWarnings({"unchecked", "rawtypes"}) static String getProperty(String key, String defaultValue); static String getSystemProperty(String key); static Properties loadProperties(String fileName); static Properties loadProperties(String fileName, boolean allowMultiFile); static Properties loadProperties(String fileName, boolean allowMultiFile, boolean optional); static int getPid();  }
@Test public void testGetPid() throws Exception { assertThat(ConfigUtils.getPid(), greaterThan(0)); }