}
@Test
public void testFormatter() throws Exception {
StringWriter writer = new StringWriter();
GraphicsDocument document = new DefaultSvgDocument(writer, false);
DecimalFormat formatter = document.getFormatter();
Assert.assertEquals("1.234", formatter.format(1.234));
Assert.assertEquals("1.23457", formatter.format(1.23456789));
Assert.assertEquals("9.876", formatter.format(9.876));
Assert.assertEquals("9.87654", formatter.format(9.87654321));
document.setMinimumFractionDigits(4);
document.setMaximumFractionDigits(6);
Assert.assertEquals("1.2340", formatter.format(1.234));
Assert.assertEquals("1.234568", formatter.format(1.23456789));
Assert.assertEquals("9.8760", formatter.format(9.876));
Assert.assertEquals("9.876543", formatter.format(9.87654321));
}