### Question:
ASTNamedParameter extends ASTScalar { @Override public void appendAsEJBQL(List<Object> parameterAccumulator, Appendable out, String rootId) throws IOException { if (value != null) { String valueString = value.toString(); if (valueString.length() > 1 && valueString.charAt(0) == '$') { out.append(':'); out.append(valueString.substring(1)); return; } } super.appendAsEJBQL(parameterAccumulator, out, rootId); } ASTNamedParameter(int id);  ASTNamedParameter();  ASTNamedParameter(Object value); @Override Expression shallowCopy(); @Override void setValue(Object value); @Override void appendAsEJBQL(List<Object> parameterAccumulator, Appendable out, String rootId);  }### Answer:
@Test public void testAppendAsEJBQL() throws IOException { ASTNamedParameter e = new ASTNamedParameter("name"); StringBuilder buffer = new StringBuilder(); e.appendAsEJBQL(buffer, "x"); String ejbql = buffer.toString(); assertEquals(":name", ejbql); }