### Question:
ResourceUtil { public static boolean getPropertyBoolean(Resource resource, String namePattern) { return resource.getValueMap().get(namePattern, false); } 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 testGetPropertyBoolean() { assertTrue(ResourceUtil.getPropertyBoolean(resource, "bool_prop_true")); assertTrue(ResourceUtil.getPropertyBoolean(resource, "bool_prop_true_str")); assertFalse(ResourceUtil.getPropertyBoolean(resource, "bool_prop_false")); assertFalse(ResourceUtil.getPropertyBoolean(resource, "bool_prop_false_str")); }
@Test public void testGetPropertyBooleanReturnsFalseWhenPropertyNotFound() { assertFalse(ResourceUtil.getPropertyBoolean(resource, "bogus_prop_name")); }