### Question:
BooleanUtil { public static boolean isTrue(final Boolean b) { return b != null && b; } private  BooleanUtil(); static boolean ifTrue(final Boolean bool, final Runnable runnable); static boolean isTrueOrNull(final Boolean b); static boolean isFalseOrNull(final Boolean b); static boolean isTrue(final Boolean b); static boolean isFalse(final Boolean b); static boolean isTrue(final String str);  }### Answer:
@Test public void testIsTrueBoolean() { assertFalse("null", BooleanUtil.isTrue((Boolean) null)); assertTrue("Boolean.TRUE", BooleanUtil.isTrue(Boolean.TRUE)); assertFalse("Boolean.FALSE", BooleanUtil.isTrue(Boolean.FALSE)); }
@Test public void testIsTrueString() { assertFalse("null", BooleanUtil.isTrue((String) null)); assertFalse("empty", BooleanUtil.isTrue("")); assertFalse("sjs", BooleanUtil.isTrue("sjs")); assertFalse("space", BooleanUtil.isTrue(" ")); assertTrue("y", BooleanUtil.isTrue("y")); assertTrue("yEs", BooleanUtil.isTrue("yEs")); assertTrue("Y", BooleanUtil.isTrue("Y")); assertTrue("YES", BooleanUtil.isTrue("YES")); assertTrue("YeS", BooleanUtil.isTrue("YeS")); assertTrue("t", BooleanUtil.isTrue("t")); assertFalse("tru", BooleanUtil.isTrue("tru")); assertTrue("true", BooleanUtil.isTrue("true")); assertTrue("True", BooleanUtil.isTrue("True")); assertTrue("t ", BooleanUtil.isTrue("t ")); }