ConfigUtils { public static boolean isEmpty(String value) { return StringUtils.isEmpty(value) || "false".equalsIgnoreCase(value) || "0".equalsIgnoreCase(value) || "null".equalsIgnoreCase(value) || "N/A".equalsIgnoreCase(value); } 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 testIsEmpty() throws Exception { assertThat(ConfigUtils.isEmpty(null), is(true)); assertThat(ConfigUtils.isEmpty(""), is(true)); assertThat(ConfigUtils.isEmpty("false"), is(true)); assertThat(ConfigUtils.isEmpty("FALSE"), is(true)); assertThat(ConfigUtils.isEmpty("0"), is(true)); assertThat(ConfigUtils.isEmpty("null"), is(true)); assertThat(ConfigUtils.isEmpty("NULL"), is(true)); assertThat(ConfigUtils.isEmpty("n/a"), is(true)); assertThat(ConfigUtils.isEmpty("N/A"), is(true)); }