BooleanUtils { public static int booleanToValue(Boolean booleanValue) { if (booleanValue) { return TRUE; } else { return FALSE; } }  static boolean valueToBoolean(int value); static int booleanToValue(Boolean booleanValue); static final int TRUE; static final int FALSE; }
@Test public void testBooleanToValue() { assertTrue(BooleanUtils.valueToBoolean(1)); assertFalse(BooleanUtils.valueToBoolean(0)); }