BasicAtomGenerator implements IGenerator<IAtomContainer> { protected boolean hasCoordinates(IAtom atom) { return atom != null && atom.getPoint2d() != null; } BasicAtomGenerator(); @Override IRenderingElement generate(IAtomContainer container, RendererModel model); IRenderingElement generate(IAtomContainer atomContainer, IAtom atom, RendererModel model); IRenderingElement generateCompactElement(IAtom atom, RendererModel model); AtomSymbolElement generateElement(IAtom atom, int alignment, RendererModel model); @Override List<IGeneratorParameter<?>> getParameters();  }
@Test public void hasCoordinatesTest() { IAtom atomWithCoordinates = super.builder.newInstance(IAtom.class); atomWithCoordinates.setPoint2d(new Point2d(0, 0)); Assert.assertTrue(generator.hasCoordinates(atomWithCoordinates)); IAtom atomWithoutCoordinates = super.builder.newInstance(IAtom.class); atomWithoutCoordinates.setPoint2d(null); Assert.assertFalse(generator.hasCoordinates(atomWithoutCoordinates)); IAtom nullAtom = null; Assert.assertFalse(generator.hasCoordinates(nullAtom)); }