Code example for BigInteger

0
public class GenericUtilsTest 
{ 
	@Test 
	public void formatValue() throws Exception 
	{ 
		final BigInteger coin = new BigInteger("100000000"); 
		assertEquals("1.00", GenericUtils.formatValue(coin, 4)); 
		assertEquals("1.00", GenericUtils.formatValue(coin, 6)); 
		assertEquals("1.00", GenericUtils.formatValue(coin, 8)); 
 
		final BigInteger justNot = new BigInteger("99999999"); 
		assertEquals("1.00", GenericUtils.formatValue(justNot, 4)); 
		assertEquals("1.00", GenericUtils.formatValue(justNot, 6)); 
		assertEquals("0.99999999", GenericUtils.formatValue(justNot, 8)); 
 
		final BigInteger slightlyMore = new BigInteger("100000001"); 
		assertEquals("1.00", GenericUtils.formatValue(slightlyMore, 4)); 
		assertEquals("1.00", GenericUtils.formatValue(slightlyMore, 6)); 
		assertEquals("1.00000001", GenericUtils.formatValue(slightlyMore, 8)); 
 
		final BigInteger value = new BigInteger("1122334455667788");