when(vehicleRoutingProblem.copyAndGetActivities(shipment2)).thenReturn(getTourActivities(shipment2));
Inserter inserter = new Inserter(new InsertionListeners(),vehicleRoutingProblem );
inserter.insertJob(shipment, new InsertionData(0,0,0,vehicle,null), route);
inserter.insertJob(shipment2, new InsertionData(0,1,2,vehicle,null),route);
JobActivityFactory activityFactory = mock(JobActivityFactory.class);
List<AbstractActivity> activities = new ArrayList<AbstractActivity>();
activities.add(new PickupShipment(shipment3));
activities.add(new DeliverShipment(shipment3));
when(activityFactory.createActivities(shipment3)).thenReturn(activities);
insertionCalculator.setJobActivityFactory(activityFactory);
InsertionData iData = insertionCalculator.getInsertionData(route, shipment3, vehicle, 0.0, null, Double.MAX_VALUE);
assertEquals(0.0,iData.getInsertionCost(),0.05);
assertEquals(0,iData.getPickupInsertionIndex());