#vulnerable code 
                             @Test
	public void whenWritingVehicleV2_readingAgainAssignsCorrectType(){
		Builder builder = VehicleRoutingProblem.Builder.newInstance();
		
		VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("vehType").addCapacityDimension(0, 20).build();
		VehicleTypeImpl type2 = VehicleTypeImpl.Builder.newInstance("vehType2").addCapacityDimension(0, 200).build();
        VehicleImpl v1 = VehicleImpl.Builder.newInstance("v1").setReturnToDepot(false).setStartLocationId("loc").setType(type1).build();
        VehicleImpl v2 = VehicleImpl.Builder.newInstance("v2").setStartLocationId("loc").setType(type2).build();
		
		builder.addVehicle(v1);
		builder.addVehicle(v2);
		
		Service s1 = Service.Builder.newInstance("1").addSizeDimension(0, 1).setLocationId("loc").setServiceTime(2.0).build();
		Service s2 = Service.Builder.newInstance("2").addSizeDimension(0, 1).setLocationId("loc2").setServiceTime(4.0).build();
		
		VehicleRoutingProblem vrp = builder.addJob(s1).addJob(s2).build();
		new VrpXMLWriter(vrp, null).write(infileName);
		
		VehicleRoutingProblem.Builder vrpToReadBuilder = VehicleRoutingProblem.Builder.newInstance();
		new VrpXMLReader(vrpToReadBuilder, null).read(infileName);
		VehicleRoutingProblem readVrp = vrpToReadBuilder.build();
		
		Vehicle v = getVehicle("v2",readVrp.getVehicles());
		assertEquals("vehType2",v.getType().getTypeId());
		assertEquals(200,v.getType().getCapacityDimensions().get(0));
		
	} 
                            #location 24 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void whenWritingVehicleV2_readingAgainAssignsCorrectType(){
		Builder builder = VehicleRoutingProblem.Builder.newInstance();
		
		VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("vehType").addCapacityDimension(0, 20).build();
		VehicleTypeImpl type2 = VehicleTypeImpl.Builder.newInstance("vehType2").addCapacityDimension(0, 200).build();
        VehicleImpl v1 = VehicleImpl.Builder.newInstance("v1").setReturnToDepot(false).setStartLocation(TestUtils.loc("loc")).setType(type1).build();
        VehicleImpl v2 = VehicleImpl.Builder.newInstance("v2").setStartLocation(TestUtils.loc("loc")).setType(type2).build();
		
		builder.addVehicle(v1);
		builder.addVehicle(v2);
		
		Service s1 = Service.Builder.newInstance("1").addSizeDimension(0, 1).setLocation(TestUtils.loc("loc")).setServiceTime(2.0).build();
		Service s2 = Service.Builder.newInstance("2").addSizeDimension(0, 1).setLocation(TestUtils.loc("loc2")).setServiceTime(4.0).build();
		
		VehicleRoutingProblem vrp = builder.addJob(s1).addJob(s2).build();
		new VrpXMLWriter(vrp, null).write(infileName);
		
		VehicleRoutingProblem.Builder vrpToReadBuilder = VehicleRoutingProblem.Builder.newInstance();
		new VrpXMLReader(vrpToReadBuilder, null).read(infileName);
		VehicleRoutingProblem readVrp = vrpToReadBuilder.build();
		
		Vehicle v = getVehicle("v2",readVrp.getVehicles());
		assertEquals("vehType2",v.getType().getTypeId());
		assertEquals(200,v.getType().getCapacityDimensions().get(0));
		
	}