MutableComponentModelImpl implements MutableComponentModel { public Set<Class> getHandledRenderPhases() { Set<Class> result = CollectionFactory.newSet(); if (parentModel != null) result.addAll(parentModel.getHandledRenderPhases()); if (handledRenderPhases != null) result.addAll(handledRenderPhases); return result; } MutableComponentModelImpl(String componentClassName, Logger logger, Resource baseResource,
                                     ComponentModel parentModel, boolean pageClass, String libraryName); String getLibraryName(); @Override String toString(); Logger getLogger(); Resource getBaseResource(); String getComponentClassName(); void addParameter(String name, boolean required, boolean allowNull, String defaultBindingPrefix,
                             boolean cached); void addParameter(String name, boolean required, boolean allowNull, String defaultBindingPrefix); ParameterModel getParameterModel(String parameterName); boolean isFormalParameter(String parameterName); List<String> getParameterNames(); List<String> getDeclaredParameterNames(); MutableEmbeddedComponentModel addEmbeddedComponent(String id, String type, String componentClassName,
                                                              boolean inheritInformalParameters, Location location); List<String> getEmbeddedComponentIds(); EmbeddedComponentModel getEmbeddedComponentModel(String componentId); String getFieldPersistenceStrategy(String fieldName); List<String> getPersistentFieldNames(); String setFieldPersistenceStrategy(String fieldName, String strategy); boolean isRootClass(); void addMixinClassName(String mixinClassName, String... order); List<String> getMixinClassNames(); void enableSupportsInformalParameters(); boolean getSupportsInformalParameters(); ComponentModel getParentModel(); boolean isMixinAfter(); void setMixinAfter(boolean mixinAfter); void setMeta(String key, String value); void addRenderPhase(Class renderPhase); void addEventHandler(String eventType); String getMeta(String key); Set<Class> getHandledRenderPhases(); boolean handlesEvent(String eventType); String[] getOrderForMixin(String mixinClassName); boolean isPage(); void doHandleActivationEventContext(); boolean handleActivationEventContext();  }
@Test public void does_not_handle_render_phase_and_no_parent() { Resource r = mockResource(); Logger logger = mockLogger(); replay(); MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null, false, null); assertFalse(model.getHandledRenderPhases().contains(BeginRender.class)); verify(); }