private static BigInteger normalize(final BigDecimal value,final int scale){
  BigDecimal valueToScale=value.setScale(scale,BigDecimal.ROUND_HALF_UP);
  return valueToScale.unscaledValue();
}

private static BigInteger normalize ( final BigDecimal value , final int scale ) { BigDecimal valueToScale = value . setScale ( scale , BigDecimal . ROUND_HALF_UP ) ; return valueToScale . unscaledValue ( ) ; }
helper method to rescale the bigdecimal to the provided scale and return the unscaled value of the resulting bigdecimal .
