AbstractRoadModel extends GenericRoadModel { @Override public boolean containsObjectAt(RoadUser obj, Point p) { if (containsObject(obj)) { return registry().getPosition(obj).equals(p); } return false; } protected  AbstractRoadModel(Unit<Length> distanceUnit,
      Unit<Velocity> speedUnit); @Override MoveProgress followPath(MovingRoadUser object, Queue<Point> path,
      TimeLapse time); @Override MoveProgress moveTo(MovingRoadUser object, Point destination,
      TimeLapse time); @Override MoveProgress moveTo(MovingRoadUser object, RoadUser destination,
      TimeLapse time); @Override MoveProgress moveTo(MovingRoadUser object, RoadUser destination,
      TimeLapse time, GeomHeuristic heuristic); @Override MoveProgress moveTo(MovingRoadUser object, Point destination,
      TimeLapse time, GeomHeuristic heuristic); @Override @Nullable Point getDestination(MovingRoadUser object); @Override void addObjectAt(RoadUser newObj, Point pos); @Override void addObjectAtSamePosition(RoadUser newObj, RoadUser existingObj); @Override void removeObject(RoadUser roadUser); @Override void clear(); @Override boolean containsObject(RoadUser obj); @Override boolean containsObjectAt(RoadUser obj, Point p); @Override boolean equalPosition(RoadUser obj1, RoadUser obj2); @Override ImmutableMap<RoadUser, Point> getObjectsAndPositions(); @Override Point getPosition(RoadUser roadUser); @Override ImmutableCollection<Point> getObjectPositions(); @Override ImmutableSet<RoadUser> getObjects(); @Override Set<RoadUser> getObjects(Predicate<RoadUser> predicate); @SuppressWarnings("unchecked") @Override Set<Y> getObjectsAt(RoadUser roadUser,
      Class<Y> type); @Override @SuppressWarnings("unchecked") Set<Y> getObjectsOfType(final Class<Y> type); @Override List<Point> getShortestPathTo(RoadUser fromObj, RoadUser toObj); @Override List<Point> getShortestPathTo(RoadUser fromObj, Point to); @Override boolean unregister(RoadUser roadUser); @Override final EventAPI getEventAPI(); @Override Unit<Length> getDistanceUnit(); @Override Unit<Velocity> getSpeedUnit();  }
@Test public void containsObjectAt() { assertFalse(model.containsObjectAt(new TestRoadUser(), new Point(2, 3))); final TestRoadUser ru = new TestRoadUser(); model.addObjectAt(ru, SW); assertFalse(model.containsObjectAt(ru, new Point(2, 3))); assertTrue(model.containsObjectAt(ru, SW)); model.followPath(ru, asPath(SE), hour(1)); final Point p = model.getPosition(ru); assertTrue(model.containsObjectAt(ru, PointTestUtil.duplicate(p))); }