### Question:
StandardPreparedQuery implements PreparedQuery { @Override public String evaluateExpressions(final Map<String, String> valMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException { final StringBuilder sb = new StringBuilder(); for (final Expression expression : expressions) { final String evaluated = expression.evaluate(valMap, decorator, stateVariables); if (evaluated != null) { sb.append(evaluated); } } return sb.toString(); } StandardPreparedQuery(final List<Expression> expressions); @Override String evaluateExpressions(final Map<String, String> valMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables); @Override String evaluateExpressions(final Map<String, String> valMap, final AttributeValueDecorator decorator); @Override boolean isExpressionLanguagePresent(); @Override VariableImpact getVariableImpact();  }### Answer:
@Test @Ignore("Intended for manual performance testing; should not be run in an automated environment") public void test10MIterations() { final Map<String, String> attrs = new HashMap<>(); attrs.put("xx", "world"); final StandardPreparedQuery prepared = (StandardPreparedQuery) Query.prepare("${xx}"); final long start = System.nanoTime(); for (int i = 0; i < 10000000; i++) { assertEquals("world", prepared.evaluateExpressions(attrs, null)); } final long nanos = System.nanoTime() - start; System.out.println(TimeUnit.NANOSECONDS.toMillis(nanos)); }
@Test @Ignore("Takes too long") public void test10MIterationsWithQuery() { final Map<String, String> attrs = new HashMap<>(); attrs.put("xx", "world"); final long start = System.nanoTime(); for (int i = 0; i < 10000000; i++) { assertEquals("world", Query.evaluateExpressions("${xx}", attrs)); } final long nanos = System.nanoTime() - start; System.out.println(TimeUnit.NANOSECONDS.toMillis(nanos)); }