assertEquals(VehicleState.IDLE, model.getVehicleState(truck));
}
@Test
public void testPickup() {
final Parcel pack1 = new TestParcel(new Point(2, 2), 0, 0, 2);
final Vehicle truck = new TestVehicle(new Point(1, 1), 10.0, 1.0);
model.register(pack1);
model.register(truck);
rm.register(pack1);
rm.register(truck);
rm.addObjectAt(pack1, new Point(1, 1));
// nothing should happen
truck.tick(TimeLapseFactory.create(0, 10000));
assertEquals(0, model.getContentsSize(truck), EPSILON);
assertTrue(model.getContents(truck).isEmpty());
assertEquals(ParcelState.AVAILABLE, model.getParcelState(pack1));
assertEquals(VehicleState.IDLE, model.getVehicleState(truck));
model.pickup(truck, pack1, TimeLapseFactory.create(0, 10000));
assertEquals(ParcelState.IN_CARGO, model.getParcelState(pack1));
assertEquals(VehicleState.IDLE, model.getVehicleState(truck));
assertFalse(rm.containsObject(pack1));
assertTrue(model.containerContains(truck, pack1));
assertEquals(2, model.getContentsSize(truck), EPSILON);
assertTrue(model.getContents(truck).contains(pack1));
assertEquals(1, model.getContents(truck).size());
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))),