RendererModel implements Serializable, Cloneable { public List<IGeneratorParameter<?>> getRenderingParameters() { List<IGeneratorParameter<?>> parameters = new ArrayList<IGeneratorParameter<?>>(); parameters.addAll(renderingParameters.values()); return parameters; } RendererModel(); List<IGeneratorParameter<?>> getRenderingParameters(); T getParameter(Class<T> param); S getDefault(Class<T> param); void set(Class<T> paramType, U value); S get(Class<T> paramType); void registerParameters(IGenerator<? extends IChemObject> generator); void setSelection(IChemObjectSelection selection); IChemObjectSelection getSelection(); Map<IAtom, IAtom> getMerge(); IAtom getHighlightedAtom(); void setHighlightedAtom(IAtom highlightedAtom); IBond getHighlightedBond(); void setHighlightedBond(IBond highlightedBond); IAtomContainer getClipboardContent(); void setClipboardContent(IAtomContainer content); void addCDKChangeListener(ICDKChangeListener listener); void removeCDKChangeListener(ICDKChangeListener listener); void fireChange(); String getToolTipText(IAtom atom); void setToolTipTextMap(Map<IAtom, String> map); Map<IAtom, String> getToolTipTextMap(); IAtomContainer getExternalSelectedPart(); void setExternalSelectedPart(IAtomContainer externalSelectedPart); boolean getNotification(); boolean hasParameter(Class<T> param); void setNotification(boolean notification);  }
@Test public void testGetRenderingParameters() { IGenerator<IChemObject> generator = new IGenerator<IChemObject>() { IGeneratorParameter<Boolean> someParam = new SomeParam(); @Override public List<IGeneratorParameter<?>> getParameters() { return new ArrayList<IGeneratorParameter<?>>() { { add(someParam); } }; } @Override public IRenderingElement generate(IChemObject object, RendererModel model) { return null; } }; RendererModel model = new RendererModel(); int nDefaultParams = model.getRenderingParameters().size(); model.registerParameters(generator); List<IGeneratorParameter<?>> params = model.getRenderingParameters(); Assert.assertNotNull(params); Assert.assertEquals(nDefaultParams + 1, params.size()); List<Class<?>> paramClasses = new ArrayList<Class<?>>(); for (IGeneratorParameter<?> param : params) paramClasses.add(param.getClass()); assertThat(paramClasses, hasItem(SomeParam.class)); }