### Question:
ValueWrapper { public Object getValue() { return value; } ValueWrapper(Object value); void add(Object incValue); void subtract(Object decValue); void multiply(Object mulValue); void divide(Object divValue); int numCompare(Object withValue); Object getValue(); void setValue(Object value); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test void testAddReturnValue() { ValueWrapperMethod method = ValueWrapper::add; assertEquals(1 + 2, method.performAndReturn("1" ,"2").getValue()); assertEquals(1.0 + 2, method.performAndReturn("1.0" ,"2").getValue()); assertEquals(1.0 + 2, method.performAndReturn("1" ,"2.0").getValue()); assertEquals(100.0 + 2, method.performAndReturn("1E2" ,"2").getValue()); assertEquals(0 + 2, method.performAndReturn(null, "2").getValue()); assertEquals(0, method.performAndReturn(null, null).getValue()); assertEquals(5 + 0, method.performAndReturn("5", null).getValue()); }
@Test void testSubtractReturnValue() { ValueWrapperMethod method = ValueWrapper::subtract; assertEquals(1 - 2, method.performAndReturn("1" ,"2").getValue()); assertEquals(1.0 - 2, method.performAndReturn("1.0" ,"2").getValue()); assertEquals(1.0 - 2, method.performAndReturn("1" ,"2.0").getValue()); assertEquals(100.0 - 2, method.performAndReturn("1E2" ,"2").getValue()); assertEquals(0 - 2, method.performAndReturn(null, "2").getValue()); assertEquals(0, method.performAndReturn(null, null).getValue()); assertEquals(5 - 0, method.performAndReturn("5", null).getValue()); }
@Test void testMultiplyReturnValue() { ValueWrapperMethod method = ValueWrapper::multiply; assertEquals(1 * 2, method.performAndReturn("1" ,"2").getValue()); assertEquals(1.0 * 2, method.performAndReturn("1.0" ,"2").getValue()); assertEquals(1.0 * 2, method.performAndReturn("1" ,"2.0").getValue()); assertEquals(100.0 * 2, method.performAndReturn("1E2" ,"2").getValue()); assertEquals(0, method.performAndReturn(null, "2").getValue()); assertEquals(0, method.performAndReturn(null, null).getValue()); assertEquals(0, method.performAndReturn("5", null).getValue()); }
@Test void testDivideReturnValue() { ValueWrapperMethod method = ValueWrapper::divide; assertEquals(1 / 2, method.performAndReturn("1" ,"2").getValue()); assertEquals(1.0 / 2, method.performAndReturn("1.0" ,"2").getValue()); assertEquals(1.0 / 2, method.performAndReturn("1" ,"2.0").getValue()); assertEquals(100.0 / 2, method.performAndReturn("1E2" ,"2").getValue()); assertEquals(0 / 2, method.performAndReturn(null, "2").getValue()); assertThrows(ArithmeticException.class, () -> method.performAndReturn(null, null)); assertThrows(ArithmeticException.class, () -> method.performAndReturn("5", null)); }