ComponentUtils { public static void updateIdWithSuffix(LifecycleElement element, String idSuffix) { if (StringUtils.isBlank(idSuffix)) { return; } if (element != null) { element.setId(element.getId() + idSuffix); } if (element instanceof Container) { LayoutManager manager = ((Container) element).getLayoutManager(); if (manager != null) { manager.setId(manager.getId() + idSuffix); } } } private  ComponentUtils(); static T copy(T component); static T copy(T component, String idSuffix); static List<T> copy(List<T> components); static void bindAndIdFieldList(List<T> fields, String addBindingPrefix, String idSuffix); static T copyComponent(T component, String addBindingPrefix, String idSuffix); static List<T> copyComponentList(List<T> components, String idSuffix); static List<T> getComponentsOfType(List<? extends Component> items,
            Class<T> componentType); static List<T> getNestedContainerComponents(Container container,
            Class<T> componentType); static List<T> getNestedNonCollectionComponents(List<Component> items,
            Class<T> componentType); static List<T> getNestedNonCollectionComponents(Container container,
            Class<T> componentType); static List<Component> getAllNestedComponents(Component component); static Component findComponentInList(List<Component> components, String componentId); static void prefixBindingPath(List<? extends Component> components, String addBindingPrefix); static void prefixBindingPath(Component component, String addBindingPrefix); static void prefixBindingPath(DataBinding field, String addBindingPrefix); static void prefixBindingPathNested(Component component, String addBindingPrefix); static void updateIdsWithSuffixNested(List<? extends Component> components, String idSuffix); static void updateIdsWithSuffixNested(Component component, String idSuffix); static void updateIdWithSuffix(LifecycleElement element, String idSuffix); static void updateChildIdsWithSuffixNested(Component component, String idSuffix); static int generateId(LifecycleElement element, int seed); static void clearAndAssignIds(List<? extends Component> components); static void setComponentsPropertyDeep(List<T> components, String propertyPath,
            Object propertyValue); static void setComponentPropertyDeep(Component component, String propertyPath, Object propertyValue); static void setComponentPropertyFinal(Component component, String propertyName, Object propertyValue); static boolean canBeRefreshed(Component component); static void pushObjectToContext(Collection<? extends LifecycleElement> elements, String contextName,
            Object contextValue); static void pushObjectToContext(Component component, String contextName, Object contextValue); static void pushAllToContext(List<? extends Component> components, Map<String, Object> sourceContext); static void pushAllToContext(Component component, Map<String, Object> sourceContext); static void updateContextsForLine(List<? extends Component> components, CollectionGroup collectionGroup,
            Object collectionLine, int lineIndex, String lineSuffix); static void updateContextForLine(Component component, CollectionGroup collectionGroup, Object collectionLine,
            int lineIndex, String lineSuffix); static void cleanContextDeap(LifecycleElement lifecycleElement); static List<T> sort(List<T> items, int defaultOrderSequence); static List<InputField> getAllInputFieldsWithinContainer(Container container); static boolean containsPropertyExpression(Component component, String propertyName,
            boolean collectionMatch); static void adjustNestedLevelsForTableCollections(Container container, int currentLevel);  }
@Test public void testUpdateIdWithSuffix() { ComponentUtils.updateIdWithSuffix(component, null); assertTrue(component.getId().equalsIgnoreCase(componentId)); String suffix = "_field"; ComponentUtils.updateIdWithSuffix(component, suffix); assertTrue(component.getId().equalsIgnoreCase(componentId + suffix)); }