### Question:
Fuzzy extends ESFunction { @Override public QueryBuilder buildQuery() throws ExecutionException { validateFunctionSignature(FUNCTION_NAME, true, EXPECTED_PARAMETERS, EXPECTED_SIGNATURE); String value = getParameters().get(1).getStringValue(); String fuzziness = getParameters().get(2).getStringValue(); String fields = ""; if (getParameters().get(0) instanceof ColumnSelector ){ fields = ((ColumnSelector) getParameters().get(0)).getColumnName().getName(); } else { fields = getParameters().get(0).getStringValue(); } if (fields.split("\\s+").length > 1){ return QueryBuilders.multiMatchQuery(value, fields.split("\\s+")).fuzziness(fuzziness); } else { return QueryBuilders.fuzzyQuery(fields, value).fuzziness(Fuzziness.build(fuzziness)); } } protected  Fuzzy(List<Selector> parameters); @Override QueryBuilder buildQuery();  }### Answer:
@Test public void testMatch() throws UnsupportedException, ExecutionException { List<Selector> parameters = new ArrayList<>(); TableName tableName = new TableName("catalog", "table"); parameters.add(new ColumnSelector(new ColumnName(tableName, "colName"))); parameters.add(new StringSelector("fieldValue")); parameters.add(new StringSelector("1")); FunctionRelation function = new FunctionRelation(ESFunction.FUZZY, parameters,tableName); ESFunction match = ESFunction.build(function); QueryBuilder builder = match.buildQuery(); String expected = "{\"fuzzy\":{\"colName\":{\"value\":\"fieldValue\",\"fuzziness\":\"1\"}}}"; Assert.assertEquals(expected, builder.toString().replaceAll("\\s+", "")); }