public void testConstructorBytesPositive2(){
  byte aBytes[]={12,56,100};
  byte rBytes[]={12,56,100};
  BigInteger aNumber=new BigInteger(aBytes);
  byte resBytes[]=new byte[rBytes.length];
  resBytes=aNumber.toByteArray();
  for (int i=0; i < resBytes.length; i++) {
    assertTrue(resBytes[i] == rBytes[i]);
  }
  assertEquals("incorrect sign",1,aNumber.signum());
}

public void testConstructorBytesPositive2 ( ) { byte aBytes [ ] = { 12 , 56 , 100 } ; byte rBytes [ ] = { 12 , 56 , 100 } ; BigInteger aNumber = new BigInteger ( aBytes ) ; byte resBytes [ ] = new byte [ rBytes . length ] ; resBytes = aNumber . toByteArray ( ) ; for ( int i = 0 ; i < resBytes . length ; i ++ ) { assertTrue ( resBytes [ i ] == rBytes [ i ] ) ; } assertEquals ( "incorrect sign" , 1 , aNumber . signum ( ) ) ; }
create a positive number from an array of bytes . the number fits in an integer .
