### Question:
TokenHandler { String replaceTokensWithOrientToken(String queryString) throws PrepareNotSupported { Matcher matcher = tokenPattern.matcher(queryString); StringBuffer buf = new StringBuffer(); while (matcher.find()) { String origToken = matcher.group(1); String tokenKey = origToken; String tokenPrefix = null; String[] tokenKeyParts = tokenKey.split(":", 2); if (tokenKeyParts.length == 2) { tokenPrefix = tokenKeyParts[0]; tokenKey = tokenKeyParts[1]; } if (tokenPrefix != null && tokenPrefix.equals(PREFIX_DOTNOTATION)) { throw new PrepareNotSupported("Prepared query not supported for params with dotnotation conversion"); } if (tokenKey != null && tokenKey.length() > 0) { String newToken = ":" + tokenKey; matcher.appendReplacement(buf, ""); buf.append(newToken); } } matcher.appendTail(buf); return buf.toString(); }   static final String PREFIX_UNQUOTED; static final String PREFIX_DOTNOTATION; }### Answer:
@Test(dependsOnMethods = {"initTokenHandler"}) public void replaceTokensWithOrientToken() throws PrepareNotSupported { String queryString = "select ${unquoted:_fields} from ${unquoted:_resource} where firstname = ${firstname} and lastname like ${lastname}"; String result = tokenHandler.replaceTokensWithOrientToken(queryString); assertEquals(result, "select :_fields from :_resource where firstname = :firstname and lastname like :lastname"); }