### Question:
PropertyUtils { public static boolean isTrue(Map<String, Object> props, String key) { if (props == null || key == null) { return false; } return isTrue(props.get(key)); } private  PropertyUtils(); static boolean isTrue(Map<String, Object> props, String key); static boolean isFalse(Map<String, Object> props, String key); static boolean isTrue(Object property); static boolean isFalse(Object property); static Long getLong(Message message, String key); static Integer getInteger(Message message, String key);  }### Answer:
@Test public void testIsTrueWithMap() { Map<String, Object> props = new HashMap<>(); assertFalse(PropertyUtils.isTrue(props, TEST_KEY)); props.put(TEST_KEY, "false"); assertFalse(PropertyUtils.isTrue(props, TEST_KEY)); props.put(TEST_KEY, Boolean.FALSE); assertFalse(PropertyUtils.isTrue(props, TEST_KEY)); props.put(TEST_KEY, "true"); assertTrue(PropertyUtils.isTrue(props, TEST_KEY)); props.put(TEST_KEY, Boolean.TRUE); assertTrue(PropertyUtils.isTrue(props, TEST_KEY)); }
@Test public void testTrue() { assertTrue(PropertyUtils.isTrue(Boolean.TRUE)); assertTrue(PropertyUtils.isTrue("true")); assertTrue(PropertyUtils.isTrue("TRUE")); assertTrue(PropertyUtils.isTrue("TrUe")); assertFalse(PropertyUtils.isTrue(Boolean.FALSE)); assertFalse(PropertyUtils.isTrue("false")); assertFalse(PropertyUtils.isTrue("FALSE")); assertFalse(PropertyUtils.isTrue("FaLSE")); assertFalse(PropertyUtils.isTrue(null)); assertFalse(PropertyUtils.isTrue("")); assertFalse(PropertyUtils.isTrue("other")); }