question: public void testMaxNegZero ( ) { byte aBytes [ ] = { 45 , 91 , 3 , - 15 , 35 , 26 , 3 , 91 } ; int aSign = - 1 ; byte rBytes [ ] = { 0 } ; BigInteger aNumber = new BigInteger ( aSign , aBytes ) ; BigInteger bNumber = BigInteger . ZERO ; 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 ] ) ; } assertTrue ( "incorrect sign" , result . signum ( ) == 0 ) ; }
target:  max(BigInteger val). max of negative and ZERO.