question: public void testRoundMathContextPrecision0 ( ) { String a = "3736186567876876578956958765675671119238118911893939591735" ; int aScale = 45 ; int precision = 0 ; RoundingMode rm = RoundingMode . HALF_UP ; MathContext mc = new MathContext ( precision , rm ) ; String res = "3736186567876.876578956958765675671119238118911893939591735" ; BigDecimal aNumber = new BigDecimal ( new BigInteger ( a ) , aScale ) ; BigDecimal result = aNumber . round ( mc ) ; assertEquals ( "incorrect quotient value" , res , result . toString ( ) ) ; assertEquals ( "incorrect quotient scale" , aScale , result . scale ( ) ) ; }
target:  round(BigDecimal, MathContext) when precision = 0