public void test21() throws Exception {
String testRequest = "VERSION=1.0.0&" + "SERVICE=WFS&"
+ "REQUEST=GETFEATURE&" + "TYPENAME=rail&" + "BBOX=10,10,20,20";
FeatureRequest baseRequest = new FeatureRequest();
baseRequest.setVersion("1.0.0");
// make base comparison objects
org.geotools.filter.GeometryFilter filter = factory
.createGeometryFilter(AbstractFilter.GEOMETRY_INTERSECTS);
//AttributeExpression leftExpression =
// factory.createAttributeExpression(null);
//leftExpression.setAttributePath("@");
// Creates coordinates for the linear ring
Coordinate[] coords = new Coordinate[5];
coords[0] = new Coordinate(10, 10);
coords[1] = new Coordinate(10, 20);
coords[2] = new Coordinate(20, 20);
coords[3] = new Coordinate(20, 10);
coords[4] = new Coordinate(10, 10);
LinearRing outerShell = new LinearRing(coords, new PrecisionModel(), 0);
Polygon polygon = new Polygon(outerShell, new PrecisionModel(), 0);
LiteralExpression rightExpression = factory.createLiteralExpression(polygon);
//filter.addLeftGeometry(leftExpression);
filter.addRightGeometry(rightExpression);
Query query = new Query();
query.setTypeName("rail");
query.addFilter(filter);
baseRequest.addQuery(query);
// run test
assertTrue(runKvpTest(baseRequest, testRequest, true));
}