RouteFollowingVehicle extends Vehicle { protected boolean isEndOfDay(TimeLapse time) { final long travelTime = computeTravelTimeTo( getRoadModel().getPosition(depot.get()), time.getTimeUnit()); return time.getEndTime() - 1 >= getAvailabilityTimeWindow().end() - travelTime; } RouteFollowingVehicle(VehicleDTO dto,
      boolean allowDelayedRouteChanging);  RouteFollowingVehicle(VehicleDTO dto,
      boolean allowDelayedRouteChanging, RouteAdjuster adjuster,
      GeomHeuristic heuristic);  RouteFollowingVehicle(VehicleDTO dto,
      boolean allowDelayedRouteChanging, RouteAdjuster adjuster); boolean isDiversionAllowed(); boolean isDelayedRouteChangingAllowed(); void setRoute(Iterable<? extends Parcel> r); Collection<Parcel> getRoute(); @OverridingMethodsMustInvokeSuper @Override void initRoadPDP(RoadModel pRoadModel, PDPModel pPdpModel); static RouteAdjuster delayAdjuster(); static RouteAdjuster nopAdjuster();  }
@Test public void isEndOfDayTest() { rm.removeObject(d); rm.addObjectAtSamePosition(d, depot); assertFalse(d.isEndOfDay(time(minute(0), minute(1)))); assertFalse(d.isEndOfDay(time(minute(29), minute(30)))); assertTrue(d.isEndOfDay(time(minute(30), minute(31)))); rm.removeObject(d); rm.addObjectAt(d, new Point(5, 5)); assertFalse(d.isEndOfDay(time(minute(25), minute(26)))); assertTrue(d.isEndOfDay(time(minute(26), minute(27)))); rm.removeObject(d); rm.addObjectAt(d, new Point(5, 5.5)); assertFalse(d.isEndOfDay(time(minute(24), minute(25)))); assertTrue(d.isEndOfDay(time(minute(25), minute(26)))); }