ConfigUtils { public static void addProperties(Properties properties) { if (properties != null) { getProperties().putAll(properties); } } 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(); @SuppressWarnings("deprecation") static int getServerShutdownTimeout();  }
@Test public void testAddProperties() throws Exception { Properties p = new Properties(); p.put("key1", "value1"); ConfigUtils.addProperties(p); assertThat((String) ConfigUtils.getProperties().get("key1"), equalTo("value1")); }