### Question:
BooleanOperators { @ScalarOperator(CAST) @SqlType(StandardTypes.REAL) public static long castToReal(@SqlType(StandardTypes.BOOLEAN) boolean value) { return value ? floatToRawIntBits(1.0f) : floatToRawIntBits(0.0f); } private  BooleanOperators(); @ScalarOperator(CAST) @SqlType(StandardTypes.DOUBLE) static double castToDouble(@SqlType(StandardTypes.BOOLEAN) boolean value); @ScalarOperator(CAST) @SqlType(StandardTypes.REAL) static long castToReal(@SqlType(StandardTypes.BOOLEAN) boolean value); @ScalarOperator(CAST) @SqlType(StandardTypes.BIGINT) static long castToBigint(@SqlType(StandardTypes.BOOLEAN) boolean value); @ScalarOperator(CAST) @SqlType(StandardTypes.INTEGER) static long castToInteger(@SqlType(StandardTypes.BOOLEAN) boolean value); @ScalarOperator(CAST) @SqlType(StandardTypes.SMALLINT) static long castToSmallint(@SqlType(StandardTypes.BOOLEAN) boolean value); @ScalarOperator(CAST) @SqlType(StandardTypes.TINYINT) static long castToTinyint(@SqlType(StandardTypes.BOOLEAN) boolean value); @ScalarOperator(CAST) @LiteralParameters("x") @SqlType("varchar(x)") static Slice castToVarchar(@SqlType(StandardTypes.BOOLEAN) boolean value); @SqlType(StandardTypes.BOOLEAN) @ScalarFunction(hidden = true) // TODO: this should not be callable from SQL static boolean not(@SqlType(StandardTypes.BOOLEAN) boolean value);  }### Answer:
@Test public void testCastToReal() { assertFunction("cast(true as real)", REAL, 1.0f); assertFunction("cast(false as real)", REAL, 0.0f); }