### Question:
Decimals { public static long encodeShortScaledValue(BigDecimal value, int scale) { return encodeShortScaledValue(value, scale, UNNECESSARY); } private  Decimals(); static long longTenToNth(int n); static BigInteger bigIntegerTenToNth(int n); static DecimalParseResult parse(String stringValue); static DecimalParseResult parseIncludeLeadingZerosInPrecision(String stringValue); static Slice encodeUnscaledValue(BigInteger unscaledValue); static Slice encodeUnscaledValue(long unscaledValue); static long encodeShortScaledValue(BigDecimal value, int scale); static long encodeShortScaledValue(BigDecimal value, int scale, RoundingMode roundingMode); static Slice encodeScaledValue(BigDecimal value, int scale); static Slice encodeScaledValue(BigDecimal value, int scale, RoundingMode roundingMode); static Slice encodeScaledValue(BigDecimal value); static BigInteger decodeUnscaledValue(Slice valueSlice); static String toString(long unscaledValue, int scale); static String toString(Slice unscaledValue, int scale); static String toString(BigInteger unscaledValue, int scale); static boolean overflows(long value, int precision); static boolean overflows(BigInteger value, int precision); static boolean overflows(BigInteger value); static boolean overflows(BigDecimal value, long precision); static void checkOverflow(BigInteger value); static BigDecimal readBigDecimal(DecimalType type, Block block, int position); static void writeBigDecimal(DecimalType decimalType, BlockBuilder blockBuilder, BigDecimal value); static BigDecimal rescale(BigDecimal value, DecimalType type); static void writeShortDecimal(BlockBuilder blockBuilder, long value); static long rescale(long value, int fromScale, int toScale); static BigInteger rescale(BigInteger value, int fromScale, int toScale); static boolean isShortDecimal(Type type); static boolean isLongDecimal(Type type); static final int MAX_PRECISION; static final int MAX_SHORT_PRECISION; static final BigInteger MAX_DECIMAL_UNSCALED_VALUE; static final BigInteger MIN_DECIMAL_UNSCALED_VALUE; }### Answer:
@Test public void testEncodeShortScaledValue() { assertEquals(encodeShortScaledValue(new BigDecimal("2.00"), 2), 200L); assertEquals(encodeShortScaledValue(new BigDecimal("2.13"), 2), 213L); assertEquals(encodeShortScaledValue(new BigDecimal("172.60"), 2), 17260L); assertEquals(encodeShortScaledValue(new BigDecimal("2"), 2), 200L); assertEquals(encodeShortScaledValue(new BigDecimal("172.6"), 2), 17260L); assertEquals(encodeShortScaledValue(new BigDecimal("-2.00"), 2), -200L); assertEquals(encodeShortScaledValue(new BigDecimal("-2.13"), 2), -213L); assertEquals(encodeShortScaledValue(new BigDecimal("-2"), 2), -200L); }