Polygon touching = (Polygon) wkt.read("POLYGON((1 1,2 1,2 2,1 2,1 1))");
Polygon disjoint = (Polygon) wkt.read("POLYGON((2 2,3 2,3 3,2 3,2 2))");
Polygon overlapping = (Polygon) wkt.read("POLYGON((0.5 0.5,1.5 0.5,1.5 1.5,0.5 1.5,0.5 0.5))");
Polygon within = (Polygon) wkt.read("POLYGON((0.1 0.1,0.9 0.1,0.9 0.9,0.1 0.9,0.1 0.1))");
Polygon contains = (Polygon) wkt.read("POLYGON((-0.1 -0.1,1.1 -0.1,1.1 1.1,-0.1 1.1,-0.1 -0.1))");
Filter filter = filterService.createOverlapsFilter(poly1, "geometry");
TestFeature f = new TestFeature();
f.expectAndReturn("geometry", touching);
Assert.assertFalse(filter.evaluate(f));
f.clear();
f.expectAndReturn("geometry", disjoint);
Assert.assertFalse(filter.evaluate(f));
f.clear();
f.expectAndReturn("geometry", overlapping);
Assert.assertTrue(filter.evaluate(f));
f.clear();
f.expectAndReturn("geometry", within);
Assert.assertFalse(filter.evaluate(f));
f.clear();
f.expectAndReturn("geometry", contains);
Assert.assertFalse(filter.evaluate(f));
}