### Question:
BigDecimalWrapper extends AbstractWrapper<BigDecimal> implements NumberWrapper<BigDecimal> { @Override public void set(Number v) { if (v instanceof BigDecimal) { super.set((BigDecimal) v); } else if (v instanceof BigInteger) { super.set(new BigDecimal((BigInteger) v)); } else { super.set(BigDecimal.valueOf(v.doubleValue())); } } BigDecimalWrapper();  BigDecimalWrapper(BigDecimal value); @Override void set(Number v); @Override void increment(); @Override void decrement(); @Override R accept(WrapperVisitor<R, P, Q, TH> visitor, P p, Q q);  }### Answer:
@Test public void testSetBigDecimalAsNumber() { Number greaterThanLongMaxValue = new BigDecimal(Long.MAX_VALUE).add(BigDecimal.ONE); BigDecimalWrapper wrapper = new BigDecimalWrapper(); wrapper.set(greaterThanLongMaxValue); assertEquals(greaterThanLongMaxValue, wrapper.get()); }
@Test public void testSetBigInteger() { BigInteger greaterThanLongMaxValue = new BigDecimal(Long.MAX_VALUE).add(BigDecimal.ONE).toBigInteger(); BigDecimalWrapper wrapper = new BigDecimalWrapper(); wrapper.set(greaterThanLongMaxValue); assertEquals(new BigDecimal(greaterThanLongMaxValue), wrapper.get()); }