}
@Test
public void whenMemorizingTwoVehicleInfoForAct_itShouldBeMemorized(){
VehicleType type = VehicleTypeImpl.Builder.newInstance("t").setCostPerDistance(4.).build();
VehicleImpl vehicle = VehicleImpl.Builder.newInstance("v").setStartLocationId("loc").build();
VehicleImpl vehicle2 = VehicleImpl.Builder.newInstance("v").setStartLocationId("loc").setType(type).build();
//getting the indices created in vrpBuilder
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
VehicleRoutingProblem vrp = vrpBuilder.addVehicle(vehicle).addVehicle(vehicle2).build();
TourActivity act = mock(TourActivity.class);
when(act.getIndex()).thenReturn(1);
StateManager stateManager = new StateManager(vrp);
StateId id = stateManager.createStateId("vehicleParam");
double distanceParam = vehicle.getType().getVehicleCostParams().perDistanceUnit;
stateManager.putActivityState(act, vehicle, id, distanceParam);
stateManager.putActivityState(act, vehicle2, id, vehicle2.getType().getVehicleCostParams().perDistanceUnit);
assertEquals(1., stateManager.getActivityState(act, vehicle, id, Double.class), 0.01);
assertEquals(4.,stateManager.getActivityState(act,vehicle2, id, Double.class),0.01);
}