question: public void testMaxEqual ( ) { byte aBytes [ ] = { 45 , 91 , 3 , - 15 , 35 , 26 , 3 , 91 } ; byte bBytes [ ] = { 45 , 91 , 3 , - 15 , 35 , 26 , 3 , 91 } ; int aSign = 1 ; int bSign = 1 ; byte rBytes [ ] = { 45 , 91 , 3 , - 15 , 35 , 26 , 3 , 91 } ; BigInteger aNumber = new BigInteger ( aSign , aBytes ) ; BigInteger bNumber = new BigInteger ( bSign , bBytes ) ; BigInteger result = aNumber . max ( 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:  max(BigInteger val). numbers are equal.