### Question:
ResourceUtil { public static Double getPropertyDouble(Resource resource, String namePattern) { return resource.getValueMap().get(namePattern, Double.class); } private  ResourceUtil(); static boolean getPropertyBoolean(Resource resource, String namePattern); static Calendar getPropertyCalendar(Resource resource, String namePattern); static Date getPropertyDate(Resource resource, String namePattern); static BigDecimal getPropertyDecimal(Resource resource, String namePattern); static Double getPropertyDouble(Resource resource, String namePattern); static Long getPropertyLong(Resource resource, String namePattern); static Resource getPropertyReference(Resource resource, String namePattern); static String getPropertyString(Resource resource, String namePattern); static List<String> getPropertyStrings(Resource resource, String namePattern);  }### Answer:
@Test public void testGetPropertyDouble() { assertEquals(Double.valueOf(1234.567d), ResourceUtil.getPropertyDouble(resource, "dbl_prop")); assertEquals(Double.valueOf(1234.567d), ResourceUtil.getPropertyDouble(resource, "dbl_prop_str")); assertEquals(Double.valueOf(1234L), ResourceUtil.getPropertyDouble(resource, "long_prop")); assertEquals(Double.valueOf(1234L), ResourceUtil.getPropertyDouble(resource, "long_prop_str")); }
@Test public void testGetPropertyDoubleReturnsNullIfPropertyNotFound() { assertNull(ResourceUtil.getPropertyDouble(resource, "bogus_prop_name")); }