public void testCase9(){
  byte aBytes[]={1,2,3,4,5,6,7,1,2,3,1,2,3,4,5};
  int aSign=1;
  byte rBytes[]={1,2,3,4,5,6,7,1,2,3,1,2,3,4,5};
  BigInteger aNumber=new BigInteger(aSign,aBytes);
  BigInteger bNumber=BigInteger.ONE;
  BigInteger result=aNumber.multiply(bNumber);
  byte resBytes[]=new byte[rBytes.length];
  resBytes=result.toByteArray();
  for (int i=0; i < resBytes.length; i++) {
    assertTrue(resBytes[i] == rBytes[i]);
  }
  assertEquals("incorrect sign",1,result.signum());
}

public void testCase9 ( ) { byte aBytes [ ] = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 1 , 2 , 3 , 1 , 2 , 3 , 4 , 5 } ; int aSign = 1 ; byte rBytes [ ] = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 1 , 2 , 3 , 1 , 2 , 3 , 4 , 5 } ; BigInteger aNumber = new BigInteger ( aSign , aBytes ) ; BigInteger bNumber = BigInteger . ONE ; BigInteger result = aNumber . multiply ( bNumber ) ; byte resBytes [ ] = new byte [ rBytes . length ] ; resBytes = result . toByteArray ( ) ; for ( int i = 0 ; i < resBytes . length ; i ++ ) { assertTrue ( resBytes [ i ] == rBytes [ i ] ) ; } assertEquals ( "incorrect sign" , 1 , result . signum ( ) ) ; }
multiply a positive number by one .
