TapestryInternalUtils { public static String extractIdFromPropertyExpression(String expression) { return InternalUtils.extractIdFromPropertyExpression(expression); }  static String toUserPresentable(String id); static Map<String, String> mapFromKeysAndValues(String... keysAndValues); static OptionModel toOptionModel(String input); static List<OptionModel> toOptionModels(String input); static SelectModel toSelectModel(String input); static OptionModel toOptionModel(Map.Entry input); static List<OptionModel> toOptionModels(Map<K, V> input); static SelectModel toSelectModel(Map<K, V> input); static OptionModel toOptionModel(Object input); static List<OptionModel> toOptionModels(List<E> input); static SelectModel toSelectModel(List<E> input); static KeyValue parseKeyValue(String input); static String extractIdFromPropertyExpression(String expression); static String defaultLabel(String id, Messages messages, String propertyExpression); static String lastTerm(String input); static String toClassAttributeValue(List<String> classes); static String getLabelForEnum(Messages messages, String prefix, Enum value); static String getLabelForEnum(Messages messages, Enum value); static boolean isEqual(T left, T right); static String[] splitPath(String path); static String[] splitAtCommas(String value); static void copy(InputStream in, OutputStream out); static boolean isEqual(EventContext left, EventContext right); static Asset2 toAsset2(final Asset asset); static InternalPropertyConduit toInternalPropertyConduit(final PropertyConduit conduit); static Orderable<String> mixinTypeAndOrder(String mixinDef); static String[] splitMixinConstraints(String s); static LinkCreationListener2 toLinkCreationListener2(final LinkCreationListener delegate); static String toFileSuffix(String fileName); static V getAndDeref(Map<K, ? extends Reference<V>> map, K key); static Thread[] getAllThreads(); static Mapper<Asset, StylesheetLink> assetToStylesheetLink; }
@Test public void extract_id_from_property_expression() { assertEquals(TapestryInternalUtils.extractIdFromPropertyExpression("simpleName"), "simpleName"); assertEquals(TapestryInternalUtils.extractIdFromPropertyExpression("complex.name().withStuff"), "complexnamewithStuff"); assertEquals(TapestryInternalUtils.extractIdFromPropertyExpression("number99.withABullet"), "number99withABullet"); }