### Question:
SmallintOperators { @ScalarOperator(ADD) @SqlType(StandardTypes.SMALLINT) public static long add(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right) { try { return Shorts.checkedCast(left + right); } catch (IllegalArgumentException e) { throw new PrestoException(NUMERIC_VALUE_OUT_OF_RANGE, format("smallint addition overflow: %s + %s", left, right), e); } } private  SmallintOperators(); @ScalarOperator(ADD) @SqlType(StandardTypes.SMALLINT) static long add(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right); @ScalarOperator(SUBTRACT) @SqlType(StandardTypes.SMALLINT) static long subtract(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right); @ScalarOperator(MULTIPLY) @SqlType(StandardTypes.SMALLINT) static long multiply(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right); @ScalarOperator(DIVIDE) @SqlType(StandardTypes.SMALLINT) static long divide(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right); @ScalarOperator(MODULUS) @SqlType(StandardTypes.SMALLINT) static long modulus(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right); @ScalarOperator(NEGATION) @SqlType(StandardTypes.SMALLINT) static long negate(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.BIGINT) static long castToBigint(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.INTEGER) static long castToInteger(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.TINYINT) static long castToTinyint(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.BOOLEAN) static boolean castToBoolean(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.DOUBLE) static double castToDouble(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.REAL) static long castToReal(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @LiteralParameters("x") @SqlType("varchar(x)") static Slice castToVarchar(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(SATURATED_FLOOR_CAST) @SqlType(StandardTypes.TINYINT) static long saturatedFloorCastToTinyint(@SqlType(StandardTypes.SMALLINT) long value);  }### Answer:
@Test public void testAdd() { assertFunction("SMALLINT'37' + SMALLINT'37'", SMALLINT, (short) (37 + 37)); assertFunction("SMALLINT'37' + SMALLINT'17'", SMALLINT, (short) (37 + 17)); assertFunction("SMALLINT'17' + SMALLINT'37'", SMALLINT, (short) (17 + 37)); assertFunction("SMALLINT'17' + SMALLINT'17'", SMALLINT, (short) (17 + 17)); assertNumericOverflow(format("SMALLINT'%s' + SMALLINT'1'", Short.MAX_VALUE), "smallint addition overflow: 32767 + 1"); }