### Question:
GeoFunctionsDescriptor implements JexlFunctionArgumentDescriptorFactory { @Override public JexlArgumentDescriptor getArgumentDescriptor(ASTFunctionNode node) { FunctionJexlNodeVisitor fvis = new FunctionJexlNodeVisitor(); fvis.visit(node, null); Class<?> functionClass = (Class<?>) ArithmeticJexlEngines.functions().get(fvis.namespace()); if (!GeoFunctions.GEO_FUNCTION_NAMESPACE.equals(node.jjtGetChild(0).image)) throw new IllegalArgumentException("Calling " + this.getClass().getSimpleName() + ".getJexlNodeDescriptor with an unexpected namespace of " + node.jjtGetChild(0).image); if (!functionClass.equals(GeoFunctions.class)) throw new IllegalArgumentException("Calling " + this.getClass().getSimpleName() + ".getJexlNodeDescriptor with node for a function in " + functionClass); verify(fvis.name(), fvis.args().size()); return new GeoJexlArgumentDescriptor(node, fvis.namespace(), fvis.name(), fvis.args()); }  @Override JexlArgumentDescriptor getArgumentDescriptor(ASTFunctionNode node);  }### Answer:
@Test public void antiMeridianTest1() throws Exception { String query = "geo:within_bounding_box(GEO_FIELD, '40_170', '50_-170')"; JexlNode node = JexlASTHelper.parseJexlQuery(query); JexlArgumentDescriptor argDesc = new GeoFunctionsDescriptor().getArgumentDescriptor((ASTFunctionNode) node.jjtGetChild(0).jjtGetChild(0)); JexlNode queryNode = argDesc.getIndexQuery(null, null, null, null); Assert.assertEquals("((GEO_FIELD >= '40.0_170.0' && GEO_FIELD <= '50.0_180') && (GEO_FIELD >= '40.0_-180' && GEO_FIELD <= '50.0_-170.0'))", JexlStringBuildingVisitor.buildQuery(queryNode)); }
@Test public void antiMeridianTest2() throws Exception { String query = "geo:within_bounding_box(LON_FIELD, LAT_FIELD, '170', '40', '-170', '50')"; JexlNode node = JexlASTHelper.parseJexlQuery(query); JexlArgumentDescriptor argDesc = new GeoFunctionsDescriptor().getArgumentDescriptor((ASTFunctionNode) node.jjtGetChild(0).jjtGetChild(0)); JexlNode queryNode = argDesc.getIndexQuery(null, null, null, null); Assert.assertEquals( "(((LON_FIELD >= '170.0' && LON_FIELD <= '180') && (LAT_FIELD >= '40.0' && LAT_FIELD <= '50.0')) && ((LON_FIELD >= '-180' && LON_FIELD <= '-170.0') && (LAT_FIELD >= '40.0' && LAT_FIELD <= '50.0')))", JexlStringBuildingVisitor.buildQuery(queryNode)); }