question: public void testFlipBitZeroOutside1 ( ) { byte aBytes [ ] = { 0 } ; int aSign = 0 ; int number = 62 ; byte rBytes [ ] = { 64 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ; BigInteger aNumber = new BigInteger ( aSign , aBytes ) ; BigInteger result = aNumber . flipBit ( number ) ; byte resBytes [ ] = new byte [ rBytes . length ] ; resBytes = result . toByteArray ( ) ; for ( int i = 0 ; i < resBytes . length ; i ++ ) { assertTrue ( "incorrect value" , resBytes [ i ] == rBytes [ i ] ) ; } assertEquals ( "incorrect sign" , 1 , result . signum ( ) ) ; }
target:  flipBit(int n) outside zero