JsUtil { public static String getJsObjectForFieldsValueWithAltFun( final String alternativeFunction, final String... ids) { if (StringUtil.isBlank(alternativeFunction)) { throw new InvalidValueException( "alternativeFunction cannot be blank"); } final StringBuilder builder = new StringBuilder(38); builder.append('{'); for (final Object id : ids) { builder.append(id.toString()).append(':') .append(alternativeFunction).append("('") .append(id.toString()).append("').value,"); } builder.replace(builder.length() - 1, builder.length(), "}"); return builder.toString(); } private  JsUtil(); static String getJsObjectForFieldsValue(
            final Map<String, Object> jsKeyAndElementId); static String getJsObjectForFieldsValue(
            final Map<String, Object> jsKeyAndElementId,
            final String alternativeFunction); static String getJsObjectForFieldsValue(final Set<Object> ids); static String getJsObjectForFieldsValue(final Set<Object> ids,
            final String alternativeFunction); static String getJsObjectForFieldsValue(final String... ids); static String getJsObjectForFieldsValueWithAltFun(
            final String alternativeFunction, final String... ids); static String getJsObjectForFieldsValue(final Set<Object> inputIds,
            final Set<Object> checkboxIds); static String getJsObjectForFieldsValue(final Set<Object> inputIds,
            final Set<Object> checkboxIds, final String alternativeFunction);  }
@Test public void testGetJsObjectForFieldsValueByElementIdsStringsWithAltFun() { assertEquals( "{uId:gebi('uId').value,b2593ccc-2ab9-4cf8-818d-1f317a27a691:gebi('b2593ccc-2ab9-4cf8-818d-1f317a27a691').value,555:gebi('555').value}", JsUtil.getJsObjectForFieldsValueWithAltFun("gebi", "uId", "b2593ccc-2ab9-4cf8-818d-1f317a27a691", "555")); }