#vulnerable code 
                             @Test
	public void whenVehicleRouteIsEmpty_loadsAtBeginningAndEndShouldBeZero(){
		StateManager stateManager = new StateManager(mock(VehicleRoutingProblem.class));

		UpdateLoads updateLoads = new UpdateLoads(stateManager);
		VehicleRoute route = VehicleRoute.emptyRoute();

		updateLoads.informInsertionStarts(Arrays.asList(route), Collections.<Job>emptyList());
		assertEquals(0.,stateManager.getRouteState(route, StateFactory.LOAD_AT_BEGINNING).toDouble(),0.1);
		assertEquals(0.,stateManager.getRouteState(route, StateFactory.LOAD_AT_END).toDouble(),0.1);
	} 
                            #location 9 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void whenVehicleRouteIsEmpty_loadsAtBeginningAndEndShouldBeZero(){
		StateManager stateManager = new StateManager(mock(VehicleRoutingTransportCosts.class));

		UpdateLoads updateLoads = new UpdateLoads(stateManager);
		VehicleRoute route = VehicleRoute.emptyRoute();

		updateLoads.informInsertionStarts(Arrays.asList(route), Collections.<Job>emptyList());
		Capacity loadAtBeginning = stateManager.getRouteState(route, StateFactory.LOAD_AT_BEGINNING, Capacity.class);
		assertEquals(0.,loadAtBeginning.get(0),0.1);
		assertEquals(0.,stateManager.getRouteState(route, StateFactory.LOAD_AT_END, Capacity.class).get(0),0.1);
	}