BoundingBoxFilter extends AreaFilter { @Override public void process(BoundContainer boundContainer) { Bound newBound; newBound = boundContainer.getEntity().intersect(bound); if (newBound != null) { super.process(new BoundContainer(newBound)); } } BoundingBoxFilter(IdTrackerType idTrackerType,
	        double left,
	        double right,
	        double top,
	        double bottom,
	        boolean clipIncompleteEntities,
	        boolean completeWays,
	        boolean completeRelations,
	        boolean cascadingRelations); @Override void process(BoundContainer boundContainer);  }
@Test public final void testProcessBoundContainer1() { Bound compareBound; simpleAreaFilter.process(new BoundContainer(intersectingBound)); simpleAreaFilter.complete(); compareBound = (Bound) entityInspector.getLastEntityContainer().getEntity(); assertTrue(Double.compare(compareBound.getRight(), 20) == 0); assertTrue(Double.compare(compareBound.getLeft(), 10) == 0); assertTrue(Double.compare(compareBound.getTop(), 20) == 0); assertTrue(Double.compare(compareBound.getBottom(), 10) == 0); assertTrue(compareBound.getOrigin().equals("intersecting")); }
@Test public final void testProcessBoundContainer2() { simpleAreaFilter.process(new BoundContainer(nonIntersectingBound)); simpleAreaFilter.complete(); assertNull(entityInspector.getLastEntityContainer()); }