question: public void testCase2 ( ) { byte aBytes [ ] = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 1 , 2 , 3 } ; byte bBytes [ ] = { 10 , 20 , 30 , 40 , 50 , 60 , 70 , 10 , 20 , 30 } ; int aSign = - 1 ; int bSign = 1 ; byte rBytes [ ] = { - 11 , - 41 , - 101 , 54 , - 97 , - 52 , - 77 , - 41 , 44 , - 86 , - 106 , - 5 , - 29 , 85 , 116 , 51 , - 101 , - 121 , - 90 } ; BigInteger aNumber = new BigInteger ( aSign , aBytes ) ; BigInteger bNumber = new BigInteger ( bSign , bBytes ) ; 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 ( ) ) ; }
target:  Multiply two numbers of the same length and different signs. The first is negative.