### Question:
DefaultCompiledQuery implements CompiledQuery { public Query cloneWithParameterValues(Object[] values) { final AtomicInteger parameterIndex = new AtomicInteger(0); final Query clonedQuery = _query.clone(); replaceParametersInQuery(values, parameterIndex, _query, clonedQuery); return clonedQuery; } DefaultCompiledQuery(Query query); Query cloneWithParameterValues(Object[] values); @Override List<QueryParameter> getParameters(); @Override String toSql(); @Override String toString(); @Override void close();  }### Answer:
@Test public void testCloneWithParameterValues() { DefaultCompiledQuery defaultCompiledQuery = new DefaultCompiledQuery(query); Query resultQuery = defaultCompiledQuery.cloneWithParameterValues(new Object[] { "BE", 1, "BE" }); defaultCompiledQuery.close(); defaultCompiledQuery = new DefaultCompiledQuery(resultQuery); Assert.assertEquals(0, defaultCompiledQuery.getParameters().size()); defaultCompiledQuery.close(); }