My percentages get truncated by the default java.text.MessageFormat function, how do you format a percentage without losing precision?
Example:
String expectedResult = "12.5%";
double fraction = 0.125;
String actualResult = MessageFormat.format("{0,number,percent}", fraction);
assert expectedResult.equals(actualResult) : actualResult +" should be formatted as "+expectedResult;