@Test void addVehicle_should_validate_arguments() { assertThatNullPointerException().isThrownBy(() -> vehicleService.addVehicle(null)); }
public void addVehicle(Vehicle vehicle) { optimizer.addVehicle(Objects.requireNonNull(vehicle)); }
VehicleService { public void addVehicle(Vehicle vehicle) { optimizer.addVehicle(Objects.requireNonNull(vehicle)); } }
VehicleService { public void addVehicle(Vehicle vehicle) { optimizer.addVehicle(Objects.requireNonNull(vehicle)); } @Autowired  VehicleService(RouteOptimizer optimizer, VehicleRepository vehicleRepository); }
VehicleService { public void addVehicle(Vehicle vehicle) { optimizer.addVehicle(Objects.requireNonNull(vehicle)); } @Autowired  VehicleService(RouteOptimizer optimizer, VehicleRepository vehicleRepository); void createVehicle(); void createVehicle(VehicleData vehicleData); void addVehicle(Vehicle vehicle); void removeVehicle(long vehicleId); synchronized void removeAnyVehicle(); void removeAll(); void changeCapacity(long vehicleId, int capacity); }
VehicleService { public void addVehicle(Vehicle vehicle) { optimizer.addVehicle(Objects.requireNonNull(vehicle)); } @Autowired  VehicleService(RouteOptimizer optimizer, VehicleRepository vehicleRepository); void createVehicle(); void createVehicle(VehicleData vehicleData); void addVehicle(Vehicle vehicle); void removeVehicle(long vehicleId); synchronized void removeAnyVehicle(); void removeAll(); void changeCapacity(long vehicleId, int capacity);  }