### Question:
ResourceUtil { public static Long getPropertyLong(Resource resource, String namePattern) { return resource.getValueMap().get(namePattern, Long.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 testGetPropertyLong() { assertEquals(Long.valueOf(1234L), ResourceUtil.getPropertyLong(resource, "long_prop")); assertEquals(Long.valueOf(1234L), ResourceUtil.getPropertyLong(resource, "long_prop_str")); }
@Test public void testGetPropertyLongReturnsNullIfPropertyNotFound() { assertNull(ResourceUtil.getPropertyLong(resource, "bogus_prop_name")); }