### Question:
BigIntegerWrapper extends AbstractWrapper<BigInteger> implements NumberWrapper<BigInteger> { @Override public void set(Number v) { if (v instanceof BigInteger) { super.set((BigInteger) v); } else if (v instanceof BigDecimal) { super.set(((BigDecimal) v).toBigInteger()); } else { super.set(BigInteger.valueOf(v.longValue())); } } BigIntegerWrapper();  BigIntegerWrapper(BigInteger 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 testSetBigIntegerAsNumber() { Number greaterThanLongMaxValue = new BigDecimal(Long.MAX_VALUE).add(BigDecimal.ONE).toBigInteger(); BigIntegerWrapper wrapper = new BigIntegerWrapper(); wrapper.set(greaterThanLongMaxValue); assertEquals(greaterThanLongMaxValue, wrapper.get()); }
@Test public void testSetBigDecimal() { BigDecimal greaterThanLongMaxValue = new BigDecimal(Long.MAX_VALUE).add(BigDecimal.ONE); BigIntegerWrapper wrapper = new BigIntegerWrapper(); wrapper.set(greaterThanLongMaxValue); assertEquals(greaterThanLongMaxValue.toBigInteger(), wrapper.get()); }