assertEquals(VehicleState.IDLE, model.getVehicleState(truck));
}
@Test
public void testPickupAfterDrop(){
final Vehicle truck = new TestVehicle(new Point(1, 1), 10.0, 1.0);
model.register(truck);
rm.register(truck);
final Parcel pack2 = new TestParcel(new Point(2, 2), 100, 100, 2);
model.register(pack2);
rm.register(pack2);
rm.addObjectAt(pack2, new Point(1, 2));
rm.followPath(truck, newLinkedList(asList(new Point(1, 2))),
TimeLapseFactory.create(0, 3600000));
model.pickup(truck, pack2, TimeLapseFactory.create(0, 40));
model.continuePreviousActions(truck, TimeLapseFactory.create(0, 40));
final TimeLapse tl = TimeLapseFactory.create(0, 40);
model.continuePreviousActions(truck, tl);
assertFalse(model.getContents(truck).isEmpty());
assertEquals(ParcelState.IN_CARGO, model.getParcelState(pack2));
assertEquals(VehicleState.IDLE, model.getVehicleState(truck));
//riding to other spot to drop
rm.followPath(truck, newLinkedList(asList(new Point(2, 2))),
TimeLapseFactory.create(0, 3600000));
model.drop(truck, pack2, TimeLapseFactory.create(0, 100));
final Vehicle truck2 = new TestVehicle(new Point(2, 2), 10.0, 1.0);
model.register(truck2);
rm.register(truck2);
model.pickup(truck2, pack2, TimeLapseFactory.create(0, 40));
model.continuePreviousActions(truck2, TimeLapseFactory.create(0, 40));