@Test
public void testResize() throws Exception {

    TextOutline outline = new TextOutline("Cl", font);
    AtomSymbol symbol = new AtomSymbol(outline, Collections.<TextOutline> emptyList());
    AtomSymbol transformed = symbol.resize(2, 2);
    Rectangle2D orgBounds = outline.getBounds();
    Rectangle2D newBounds = transformed.getOutlines().get(0).getBounds2D();
    assertThat(newBounds.getX(), closeTo(orgBounds.getX() - orgBounds.getWidth() / 2, 0.01));
    assertThat(newBounds.getY(), closeTo(orgBounds.getY() - orgBounds.getHeight() / 2, 0.01));
    assertThat(newBounds.getMaxX(), closeTo(orgBounds.getMaxX() + orgBounds.getWidth() / 2, 0.01));
    assertThat(newBounds.getMaxY(), closeTo(orgBounds.getMaxY() + orgBounds.getHeight() / 2, 0.01));
}