### Question:
IntegerValue extends Value { @Override Value subtract (Value v) { if (v instanceof IntegerValue) { return new IntegerValue (intValue () - v.toIntegerValue ().intValue ()); } else if (v instanceof RealValue) { return toRealValue ().subtract(v); } else { throw newOperandException ("-"); } } IntegerValue(int value);   IntegerValue(String value); @Override String toString();  }### Answer:
@Test public void testSubtract () { assertEquals ("0", mPositiveValue.subtract (mPositiveValue).toString ()); assertEquals ("123", mZeroValue.subtract (mNegativeValue).toString ()); assertEquals ("-123", mZeroValue.subtract (mPositiveValue).toString ()); assertEquals ("-0,5", mZeroValue.subtract (mRealHalfValue).toString ()); try { mZeroValue.subtract (new BooleanValue (true)); fail ("no exception"); } catch (ExecutionException ee) { } }