### Question:
ElasticsearchSerializer implements Visitor<Object, BoolQueryBuilder> { @Nullable @Override public Object visit(Constant<?> expr, @Nullable BoolQueryBuilder context) { if (Enum.class.isAssignableFrom(expr.getType())) { return ((Enum<?>) expr.getConstant()).name(); } else { return expr.getConstant(); } }  Object handle(Expression<?> expression); SortBuilder toSort(OrderSpecifier<?> orderBy); @Nullable @Override Object visit(Constant<?> expr, @Nullable BoolQueryBuilder context); @Nullable @Override Object visit(FactoryExpression<?> expr, @Nullable BoolQueryBuilder context); String asDBKey(Operation<?> expr, int index); Object asDBValue(Operation<?> expr, int index); @Nullable @Override Object visit(Operation<?> expr, @Nullable BoolQueryBuilder context); @Nullable @Override Object visit(ParamExpression<?> expr, @Nullable BoolQueryBuilder context); @Nullable @Override Object visit(Path<?> expr, @Nullable BoolQueryBuilder context); @Nullable @Override Object visit(SubQueryExpression<?> expr, @Nullable BoolQueryBuilder context); @Nullable @Override Object visit(TemplateExpression<?> expr, @Nullable BoolQueryBuilder context);  }### Answer:
@Test public void Paths() { QUser user = QUser.user; assertEquals("user", serializer.visit(user, null)); assertEquals("firstName", serializer.visit(user.firstName, null)); }