IntegerToBigInteger extends IntegerToInteger { @Override public void validate(Class<?> type, int size, int decimals) { if(!BigInteger.class.equals(type)) { throw new TypeConverterException("Only supports converting to and from BigInteger"); } }  @Override void validate(Class<?> type, int size, int decimals); @Override BigInteger to(byte[] bytes, int offset, int length, int decimals, boolean removePadding); @Override byte[] from(Object value, int length, int decimals, boolean addPadding);  }
@Test public void testValidateSuccess() throws Exception { typeConverter.validate(BigInteger.class, 10, -1); }
@Test public void testValidateFail() throws Exception { expectedEx.expect(TypeConverterException.class); expectedEx.expectMessage("Only supports converting to and from BigInteger"); typeConverter.validate(Integer.TYPE, 2, -1); }