SystemPropertiesUtil { public static Integer getInteger(String name) { return Integer.getInteger(name); }  static Boolean getBoolean(String name); static Boolean getBoolean(String name, Boolean defaultValue); static String getString(String name); static String getString(String name, String defaultValue); static Integer getInteger(String name); static Integer getInteger(String name, Integer defaultValue); static Long getLong(String name); static Long getLong(String name, Long defaultValue); static Double getDouble(String propertyName); static Double getDouble(String propertyName, Double defaultValue); static String getString(String propertyName, String envName, String defaultValue); static Integer getInteger(String propertyName, String envName, Integer defaultValue); static Long getLong(String propertyName, String envName, Long defaultValue); static Double getDouble(String propertyName, String envName, Double defaultValue); static Boolean getBoolean(String propertyName, String envName, Boolean defaultValue); static synchronized void registerSystemPropertiesListener(PropertiesListener listener);  }
@Test public void intSystemProperty() { String name = "ss.test" + RandomUtil.nextInt(); String envName = "ss_test" + RandomUtil.nextInt(); int result = SystemPropertiesUtil.getInteger(name, envName, 123); assertThat(result).isEqualTo(123); System.setProperty(name, "456"); int result3 = SystemPropertiesUtil.getInteger(name, envName, 123); assertThat(result3).isEqualTo(456); System.clearProperty(name); }