BoundsGenerator implements IGenerator<IReaction> { @Override public IRenderingElement generate(IReaction reaction, RendererModel model) { ElementGroup elementGroup = new ElementGroup(); IAtomContainerSet reactants = reaction.getReactants(); if (reactants != null) { elementGroup.add(this.generate(reactants)); } IAtomContainerSet products = reaction.getProducts(); if (products != null) { elementGroup.add(this.generate(products)); } return elementGroup; } BoundsGenerator(); @Override IRenderingElement generate(IReaction reaction, RendererModel model); @Override List<IGeneratorParameter<?>> getParameters();  }
@Test public void testEmptyReaction() { IReaction emptyReaction = super.builder.newInstance(IReaction.class); IRenderingElement root = generator.generate(emptyReaction, model); List<IRenderingElement> elements = elementUtil.getAllSimpleElements(root); Assert.assertEquals(2, elements.size()); }