PropertiesUtil extends PropertyPlaceholderConfigurer { public static long getLongProperty(String key, long defaultValue) { if (key == null) { return defaultValue; } String rtrnVal = propertiesMap.get(key); if (rtrnVal == null) { return defaultValue; } return Long.valueOf(rtrnVal); } private  PropertiesUtil(); static String getProperty(String key, String defaultValue); static String getProperty(String key); static String[] getPropertyStringList(String key); static Integer getIntProperty(String key, int defaultValue); static long getLongProperty(String key, long defaultValue); static Integer getIntProperty(String key); static boolean getBooleanProperty(String key, boolean defaultValue); static Map<String, String> getPropertiesMap(); static Properties getProps();  }
@Test public void testGetLongProperty(){ String key="longKey"; long defaultValue=23L; Long value = PropertiesUtil.getLongProperty(key, defaultValue); Assert.assertNotNull(value); Assert.assertEquals(value.intValue(), defaultValue); }