@Test public void useCrossedBondIfNeeded() {

    IAtomContainer m = new AtomContainer();
    m.addAtom(atom("C", 3, 0.000, 0.000));
    m.addAtom(atom("C", 1, 1.299, -0.750));
    m.addAtom(atom("C", 1, 2.598, -0.000));
    m.addAtom(atom("C", 1, 3.897, -0.750));
    m.addAtom(atom("C", 1, 5.196, -0.000));
    m.addAtom(atom("C", 1, 6.495, -0.750));
    m.addAtom(atom("C", 1, 7.794, -0.000));
    m.addAtom(atom("C", 3, 9.093, -0.750));
    m.addBond(0, 1, IBond.Order.SINGLE);
    m.addBond(1, 2, IBond.Order.DOUBLE);
    m.addBond(2, 3, IBond.Order.SINGLE);
    m.addBond(3, 4, IBond.Order.DOUBLE);
    m.addBond(4, 5, IBond.Order.SINGLE);
    m.addBond(5, 6, IBond.Order.DOUBLE);
    m.addBond(6, 7, IBond.Order.SINGLE);
    m.addStereoElement(new DoubleBondStereochemistry(m.getBond(1),
                                                     new IBond[]{
                                                             m.getBond(0),
                                                             m.getBond(2)
                                                     },
                                                     OPPOSITE));
    m.addStereoElement(new DoubleBondStereochemistry(m.getBond(5),
                                                     new IBond[]{
                                                             m.getBond(4),
                                                             m.getBond(6)
                                                     },
                                                     OPPOSITE));
    NonplanarBonds.assign(m);
    assertThat(m.getBond(3).getStereo(), is(IBond.Stereo.E_OR_Z));
}