public void testRegister() {
GridSpatialIndex index = (GridSpatialIndex)((GridFeatureCache)cache).getIndex();
double tilesize = index.getRootNode().getTileSize();
Region r = (Region)index.getRootNode().getShape();
//matches all
Envelope e = new Envelope(r.getLow(0), r.getHigh(0), r.getLow(1), r.getHigh(1));
List<Envelope> matches = cache.match(e);
assertEquals(1, matches.size());
//matches 4 tiles
e = new Envelope(r.getLow(0), r.getLow(0) + 2 * tilesize-0.00001, r.getLow(1), r.getLow(1) + 2 *tilesize - 0.0001);
matches = cache.match(e);
assertEquals(4, matches.size());
cache.remove(e);