@Test
public void positionOfChargeWhenTwoHydrogensAreAbove() {

    // hydrogen is arbitrarily moved to ensure x/y are different from the element
    TextOutline charge = new TextOutline("+", font);
    TextOutline localHydrogen = hydrogen.translate(10, 10);
    TextOutline positioned = atomGenerator.positionChargeLabel(2, HydrogenPosition.Above, charge, element,
            localHydrogen);
    Rectangle2D hydrogenBounds = localHydrogen.getBounds();
    Rectangle2D chargeBounds = positioned.getBounds();
    Rectangle2D elementBounds = element.getBounds();
    assertThat(chargeBounds.getMinX(), greaterThan(elementBounds.getMinX()));
    assertThat(chargeBounds.getCenterY(), closeTo(elementBounds.getMinY(), 0.01));
}