@Test
public void testGetBestAlignmentForLabelXY() {

    final String TYPE = "C";
    IAtom zero = new Atom("O");
    zero.setPoint2d(new Point2d());
    IAtom pX = new Atom(TYPE);
    pX.setPoint2d(new Point2d(1, 0));
    IAtom nX = new Atom(TYPE);
    nX.setPoint2d(new Point2d(-1, 0));
    IAtom pY = new Atom(TYPE);
    pY.setPoint2d(new Point2d(0, 1));
    IAtom nY = new Atom(TYPE);
    nY.setPoint2d(new Point2d(0, -1));
    Assert.assertEquals(-1, alignmentTestHelper(zero, pX));
    Assert.assertEquals(1, alignmentTestHelper(zero, nX));
    Assert.assertEquals(-2, alignmentTestHelper(zero, pY));
    Assert.assertEquals(2, alignmentTestHelper(zero, nY));
    Assert.assertEquals(1, alignmentTestHelper(zero, pY, nY));
}