ConfigurationUtils { @SuppressWarnings("deprecation") public static int getServerShutdownTimeout() { int timeout = DEFAULT_SERVER_SHUTDOWN_TIMEOUT; Configuration configuration = getGlobalConfiguration(); String value = StringUtils.trim(configuration.getString(SHUTDOWN_WAIT_KEY)); if (value != null && value.length() > 0) { try { timeout = Integer.parseInt(value); } catch (Exception e) { } } else { value = StringUtils.trim(configuration.getString(SHUTDOWN_WAIT_SECONDS_KEY)); if (value != null && value.length() > 0) { try { timeout = Integer.parseInt(value) * 1000; } catch (Exception e) { } } } return timeout; }  static Configuration getSystemConfiguration(); static Configuration getEnvConfiguration(); static Configuration getGlobalConfiguration(); @SuppressWarnings("deprecation") static int getServerShutdownTimeout(); static String getProperty(String property); static String getProperty(String property, String defaultValue); static int get(String property, int defaultValue); static Map<String, String> parseProperties(String content);  }
@Test public void testGetServerShutdownTimeout () { System.setProperty(SHUTDOWN_WAIT_KEY, " 10000"); Assertions.assertEquals(10000, ConfigurationUtils.getServerShutdownTimeout()); System.clearProperty(SHUTDOWN_WAIT_KEY); }