VehicleService { public void removeAll() { optimizer.removeAllVehicles(); vehicleRepository.removeAll(); } @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);  }
@Test void removeAll() { vehicleService.removeAll(); verify(optimizer).removeAllVehicles(); verify(vehicleRepository).removeAll(); }