private void verifyAddSubtractInverse(long a, long b) {
    final short scale = 0;
    Decimal128 decA = new Decimal128(a, scale);
    Decimal128 decB = new Decimal128(b, scale);
    decA.addDestructive(decB, scale);

    decA.subtractDestructive(decB, scale);
    assertEquals("Error for a = " + Long.toString(a) + ", b = " + Long.toString(b),
        new Decimal128(a, scale), decA);
  }
Verify that (a + b) - b == a
for decimal add and subtract for scale 0 with long integer inputs.
common/src/test/org/apache/hadoop/hive/common/type/TestDecimal128.java