### Question:
ResourceUtil { public static Date getPropertyDate(Resource resource, String namePattern) { return resource.getValueMap().get(namePattern, Date.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 testGetPropertyDate() { assertEquals(new GregorianCalendar(2016, 10, 15, 12, 34, 56).getTime(), ResourceUtil.getPropertyDate(resource, "date_prop")); }
@Test public void testGetPropertyDateReturnsNullIfPropertyNotFound() { assertNull(ResourceUtil.getPropertyDate(resource, "bogus_prop_name")); }